mydns.spec

Darek Moszkowicz mospanek at interia.pl
Thu Sep 11 05:57:15 CEST 2008


Maly update mydns.spec. Prosze o uwagi lub commit. Dzieki.


----------------------------------------------------------------------
Drogowa Mapa Polski GPS w Twoim telefonie!
Pobierz >> http://link.interia.pl/f1f0a 
-------------- next part --------------
# $Revision: 1.3 $, $Date: 2008-01-24 01:23:01 $
# TODO:
# - fix configure patch to change source file instead of generated configure
#
# Conditional build:
%bcond_with	mysql		# enable MySQL support
%bcond_with	pgsql		# enable PostgreSQL support
%bcond_with	ssl		# enable TLS/SSL support
#
Summary:	MyDNS - a free Database Driven Nameserver
Summary(pl.UTF-8):	MyDNS - darmowy serwer nazw wykorzystujÄ
cy relacyjne bazy danych
Name:		mydns
Version:	1.1.0
Release:	1
License:	GPL v2
Group:		Networking/Daemons
Source0:	http://mydns.bboy.net/download/%{name}-%{version}.tar.gz
Source1:	%{name}.conf
Source2:	%{name}.init
Source3:	%{name}.sysconfig
Patch0:		%{name}-m4.patch
URL:		http://mydns.bboy.net/
BuildRequires:	autoconf >= 2.59
BuildRequires:	automake >= 1:1.9.6
%{?with_mysql:BuildRequires:	mysql-devel}
%{?with_ssl:BuildRequires:	openssl-devel >= 0.9.7i}
%{?with_pgsql:BuildRequires:	postgresql-devel}
BuildRequires:	rpmbuild(macros) >= 1.310
BuildRequires:	texinfo
BuildRequires:	zlib-devel
Requires(post,preun):	/sbin/chkconfig
Requires:	rc-scripts
Provides:	nameserver
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
MyDNS is a free DNS server implemented from scratch and is designed to
serve records directly from an SQL database, either MySQL or
PostgreSQL.

%description -l pl.UTF-8
MyDNS to darmowy serwer nazw zaimplementowany od podstaw i
zaprojektowany aby udostępniać rekordy bezpośrednio z bazy SQL -
obecnie MySQL lub PostgreSQL.

%prep
%setup -q
%patch0 -p1

%build
%{__libtoolize}
%{__aclocal} -I m4
%{__autoheader}
%{__automake}
%{__autoconf}
%configure \
	--disable-nls \
	--disable-dependency-tracking \
	--with-confdir=%{_sysconfdir}/%{name} \
	--with%{?with_mysql:out}-pgsql \
	--with%{?with_pgsql:out}-mysql \
	--with%{!?with_ssl:out}-openssl
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mydns

rm -f $RPM_BUILD_ROOT%{_infodir}/dir*

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add %{name}
%service %{name} restart
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1

%preun
if [ "$1" = "0" ]; then
	%service -q %{name} stop
	/sbin/chkconfig --del %{name}
fi

%postun	-p	/sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}

%files
%defattr(644,root,root,755)
%doc ChangeLog AUTHORS BUGS README README.mysql INSTALL NEWS TODO QUICKSTART.*
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%dir %{_sysconfdir}/%{name}
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mydns
%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_bindir}/*
%{_infodir}/*.info*
%{_mandir}/man*/*

%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log: mydns.spec,v $
Revision 1.3  2008-01-24 01:23:01  glen
- invoke fix-info-dir via /sbin/postshell where possible to avoid extra /bin/sh dep

Revision 1.2  2007-04-28 08:50:20  qboosh
- UTF-8, some cleanups

Revision 1.1  2007/04/28 08:47:51  qboosh
- raw from Darek Moszkowicz
-------------- next part --------------
diff -urN mydns-1.1.0-org/configure.ac mydns-1.1.0/configure.ac
--- mydns-1.1.0-org/configure.ac	2005-04-21 11:40:13.000000000 -0500
+++ mydns-1.1.0/configure.ac	2008-09-09 17:13:24.000000000 -0500
@@ -21,6 +21,7 @@
 AC_INIT(mydns, [1.1.0], [bboy at bboy.net])		## Package name, version, bugreport address
 AC_PREREQ([2.59])
 AC_COPYRIGHT([Portions of this script are Copyright 2002-2005 Don Moore])
+AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([1.9.5 dist-bzip2])
 AM_CONFIG_HEADER(config.h)
 
diff -urN mydns-1.1.0-org/m4/mydns.m4 mydns-1.1.0/m4/mydns.m4
--- mydns-1.1.0-org/m4/mydns.m4	2006-01-18 16:08:14.000000000 -0600
+++ mydns-1.1.0/m4/mydns.m4	2008-09-08 13:08:07.000000000 -0500
@@ -47,7 +47,7 @@
 		do
 			if test "$ac_ssl_lib_found" != yes
 			then
-				AC_CHECK_FILE($dir/libssl.a, ac_ssl_lib_found=yes, ac_ssl_lib_found=no)
+				AC_CHECK_FILE($dir/libssl.so, ac_ssl_lib_found=yes, ac_ssl_lib_found=no)
 				if test "$ac_ssl_lib_found" = yes
 				then
 					LIBSSL="-L$dir -lssl -lcrypto"
@@ -59,7 +59,7 @@
 			AC_MSG_ERROR([
 
 ][  ###
-][  ###  OpenSSL libraries (libssl.a/libcrypto.a) not found!
+][  ###  OpenSSL libraries (libssl.so/libcrypto.a) not found!
 ][  ###
 ][  ###  If your OpenSSL libraries are in an unusual location,
 ][  ###  specify the directory where they are located with:
@@ -461,7 +461,7 @@
 		do
 			if test "$ac_zlib_found" != yes
 			then
-				AC_CHECK_FILE($dir/libz.a, ac_zlib_found=yes, ac_zlib_found=no)
+				AC_CHECK_FILE($dir/libz.so, ac_zlib_found=yes, ac_zlib_found=no)
 				if test "$ac_zlib_found" = yes
 				then
 					AC_CHECK_LIB(z, deflate, ac_zlib_ok=yes, ac_zlib_ok=no)
@@ -524,7 +524,7 @@
 		libmysqlclient_found=no, libmysqlclient_ok=no
 		for libmysqlclient_dir in $libmysqlclient_dirs; do
 			if test "$libmysqlclient_found" != yes; then
-				AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.a, libmysqlclient_found=yes, libmysqlclient_found=no)
+				AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so, libmysqlclient_found=yes, libmysqlclient_found=no)
 				if test "$libmysqlclient_found" != yes; then
 					AC_CHECK_FILE($libmysqlclient_dir/libmysqlclient.so.10, libmysqlclient_found=yes, libmysqlclient_found=no)
 				fi
@@ -541,7 +541,7 @@
 						AC_MSG_ERROR([
 
 ][  ###
-][  ###  zlib compression library (libz.a) not found.
+][  ###  zlib compression library (libz.so) not found.
 ][  ###
 ][  ###  Please download and install the zlib compression
 ][  ###  library from the following URL:
@@ -553,7 +553,7 @@
 ])
      				fi
 					LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
-					#LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.a"
+					#LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.so"
 					libmysqlclient_found=yes
 				fi
 			fi
@@ -630,7 +630,7 @@
 		do
 			if test "$ac_mydns_lib_found" != yes
 			then
-				AC_CHECK_FILE($dir/libpq.a, ac_mydns_lib_found=yes, ac_mydns_lib_found=no)
+				AC_CHECK_FILE($dir/libpq.so, ac_mydns_lib_found=yes, ac_mydns_lib_found=no)
 				if test "$ac_mydns_lib_found" = "yes"; then
 					LIBPQ="-L$dir -lpq"
 


More information about the pld-devel-pl mailing list