mydns.spec
Darek Moszkowicz
mospanek at interia.pl
Fri Aug 4 02:22:45 CEST 2006
Witam,
panowie developerzy, może ktoś rzucić na to fachowym okiem, szczególnie
na sekcje BuildRequires. Prosze o wskazanie błędów no i ewentualnie o
commit.
Pozdrawiam
Darek Moszkowicz
----------------------------------------------------------------------
PS. Fajny portal... >>> http://link.interia.pl/f196a
-------------- next part --------------
diff -durN -x '*~' mydns-1.1.0.orig/configure mydns-1.1.0/configure
--- mydns-1.1.0.orig/configure 2006-01-18 16:08:37.000000000 -0600
+++ mydns-1.1.0/configure 2006-07-25 17:54:28.000000000 -0500
@@ -15718,6 +15718,32 @@
fi
if test "$libmysqlclient_found" != yes; then
+ as_ac_File=`echo "ac_cv_file_$libmysqlclient_dir/libmysqlclient.so" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $libmysqlclient_dir/libmysqlclient.so" >&5
+echo $ECHO_N "checking for $libmysqlclient_dir/libmysqlclient.so... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "$cross_compiling" = yes &&
+ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+if test -r "$libmysqlclient_dir/libmysqlclient.so"; then
+ eval "$as_ac_File=yes"
+else
+ eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+ libmysqlclient_found=yes
+else
+ libmysqlclient_found=no
+fi
+
+ fi
+ if test "$libmysqlclient_found" != yes; then
as_ac_File=`echo "ac_cv_file_$libmysqlclient_dir/libmysqlclient.so.10" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $libmysqlclient_dir/libmysqlclient.so.10" >&5
echo $ECHO_N "checking for $libmysqlclient_dir/libmysqlclient.so.10... $ECHO_C" >&6
@@ -15922,8 +15948,8 @@
" >&2;}
{ (exit 1); exit 1; }; }
fi
- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
- #LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.a"
+ #LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
+ LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.so"
libmysqlclient_found=yes
fi
fi
@@ -16017,6 +16043,32 @@
fi
if test "$libmysqlclient_found" != yes; then
+ as_ac_File=`echo "ac_cv_file_$libmysqlclient_dir/libmysqlclient.so" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $libmysqlclient_dir/libmysqlclient.so" >&5
+echo $ECHO_N "checking for $libmysqlclient_dir/libmysqlclient.so... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "$cross_compiling" = yes &&
+ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+if test -r "$libmysqlclient_dir/libmysqlclient.so"; then
+ eval "$as_ac_File=yes"
+else
+ eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+ libmysqlclient_found=yes
+else
+ libmysqlclient_found=no
+fi
+
+ fi
+ if test "$libmysqlclient_found" != yes; then
as_ac_File=`echo "ac_cv_file_$libmysqlclient_dir/libmysqlclient.so.10" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $libmysqlclient_dir/libmysqlclient.so.10" >&5
echo $ECHO_N "checking for $libmysqlclient_dir/libmysqlclient.so.10... $ECHO_C" >&6
@@ -16221,8 +16273,8 @@
" >&2;}
{ (exit 1); exit 1; }; }
fi
- LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
- #LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.a"
+ #LIBMYSQLCLIENT="-L$libmysqlclient_dir -lmysqlclient"
+ LIBMYSQLCLIENT="$libmysqlclient_dir/libmysqlclient.so"
libmysqlclient_found=yes
fi
fi
@@ -16308,9 +16360,9 @@
do
if test "$ac_mydns_lib_found" != yes
then
- as_ac_File=`echo "ac_cv_file_$dir/libpq.a" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $dir/libpq.a" >&5
-echo $ECHO_N "checking for $dir/libpq.a... $ECHO_C" >&6
+ as_ac_File=`echo "ac_cv_file_$dir/libpq.so" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $dir/libpq.so" >&5
+echo $ECHO_N "checking for $dir/libpq.so... $ECHO_C" >&6
if eval "test \"\${$as_ac_File+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -16318,7 +16370,7 @@
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
-if test -r "$dir/libpq.a"; then
+if test -r "$dir/libpq.so"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
@@ -16385,7 +16437,7 @@
echo "$as_me:$LINENO: checking for PostgreSQL version number" >&5
echo $ECHO_N "checking for PostgreSQL version number... $ECHO_C" >&6
- PG_VERSION=`grep "PG_VERSION " /usr/local/pgsql/include/pg_config.h | cut -f3 -d' '`
+ PG_VERSION=`grep "PG_VERSION " /usr/include/pg_config.h | cut -f3 -d' '`
echo "$as_me:$LINENO: result: $PG_VERSION" >&5
echo "${ECHO_T}$PG_VERSION" >&6
@@ -16446,9 +16498,9 @@
do
if test "$ac_mydns_lib_found" != yes
then
- as_ac_File=`echo "ac_cv_file_$dir/libpq.a" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $dir/libpq.a" >&5
-echo $ECHO_N "checking for $dir/libpq.a... $ECHO_C" >&6
+ as_ac_File=`echo "ac_cv_file_$dir/libpq.so" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $dir/libpq.so" >&5
+echo $ECHO_N "checking for $dir/libpq.so... $ECHO_C" >&6
if eval "test \"\${$as_ac_File+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -16456,7 +16508,7 @@
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
-if test -r "$dir/libpq.a"; then
+if test -r "$dir/libpq.so"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
@@ -16523,7 +16575,7 @@
echo "$as_me:$LINENO: checking for PostgreSQL version number" >&5
echo $ECHO_N "checking for PostgreSQL version number... $ECHO_C" >&6
- PG_VERSION=`grep "PG_VERSION " /usr/local/pgsql/include/pg_config.h | cut -f3 -d' '`
+ PG_VERSION=`grep "PG_VERSION " /usr/include/pg_config.h | cut -f3 -d' '`
echo "$as_me:$LINENO: result: $PG_VERSION" >&5
echo "${ECHO_T}$PG_VERSION" >&6
@@ -16594,9 +16646,9 @@
do
if test "$ac_ssl_lib_found" != yes
then
- as_ac_File=`echo "ac_cv_file_$dir/libssl.a" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $dir/libssl.a" >&5
-echo $ECHO_N "checking for $dir/libssl.a... $ECHO_C" >&6
+ as_ac_File=`echo "ac_cv_file_$dir/libssl.so" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $dir/libssl.so" >&5
+echo $ECHO_N "checking for $dir/libssl.so... $ECHO_C" >&6
if eval "test \"\${$as_ac_File+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -16604,7 +16656,7 @@
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
-if test -r "$dir/libssl.a"; then
+if test -r "$dir/libssl.so"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
@@ -16629,7 +16681,7 @@
{ { echo "$as_me:$LINENO: 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:
@@ -16647,7 +16699,7 @@
echo "$as_me: 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:
-------------- next part --------------
##
## /etc/mydns/mydns.conf
## Thu Jul 27 15:43:33 2006
## For more information, see mydns.conf(5).
##
# DATABASE INFORMATION
db-host = localhost # SQL server hostname
db-user = username # SQL server username
db-password = password # SQL server password
database = mydns # MyDNS database name
# GENERAL OPTIONS
user = nobody # Run with the permissions of this user
group = nobody # Run with the permissions of this group
listen = * # Listen on these addresses ('*' for all)
no-listen = # Do not listen on these addresses
# CACHE OPTIONS
zone-cache-size = 1024 # Maximum number of elements stored in the zone cache
zone-cache-expire = 60 # Number of seconds after which cached zones expires
reply-cache-size = 1024 # Maximum number of elements stored in the reply cache
reply-cache-expire = 30 # Number of seconds after which cached replies expire
# ESOTERICA
log = LOG_DAEMON # Facility to use for program output (LOG_*/stdout/stderr)
pidfile = /var/run/mydns.pid # Path to PID file
timeout = 120 # Number of seconds after which queries time out
multicpu = 1 # Number of CPUs installed on your system
recursive = # Location of recursive resolver
allow-axfr = no # Should AXFR be enabled?
allow-tcp = no # Should TCP be enabled?
allow-update = no # Should DNS UPDATE be enabled?
ignore-minimum = no # Ignore minimum TTL for zone?
soa-table = soa # Name of table containing SOA records
rr-table = rr # Name of table containing RR data
soa-where = # Extra WHERE clause for SOA queries
rr-where = # Extra WHERE clause for RR queries
-------------- next part --------------
#!/bin/sh
#
# mydns This starts and stops mydns.
#
# chkconfig: 345 52 50
# description: A database-driven DNS server
# Source function library
. /etc/rc.d/init.d/functions
# Source networking configuration
. /etc/sysconfig/network
# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
msg_network_down "MyDNS"
exit 1
fi
else
exit 0
fi
MYDNSD=/usr/sbin/mydns
LOCKF=/var/lock/subsys/mydns
CONFIG=/etc/mydns/mydns.conf
[ -f "$MYDNSD" ] || exit 0
[ -f "$CONFIG" ] || exit 0
RETVAL=0
case "$1" in
start)
# Check if the service is already running?
if [ ! -f "$LOCKF" ]; then
msg_starting MYDNS
daemon "$MYDNSD" -b
RETVAL=$?
[ $RETVAL -eq 0 ] && touch "$LOCKF"
else
msg_already_running MYDNS
fi
;;
stop)
# Stop daemons.
if [ -f "$LOCKF" ]; then
msg_stopping MYDNS
killproc "$MYDNSD"
rm -f "$LOCKF" > /dev/null 2>&1
else
msg_not_running MYDNS
fi
;;
status)
status mydns
exit $?
;;
reload)
if [ -f "$LOCKF" ]; then
msg_reloading MYDNS
killproc "$MYDNSD" -HUP
RETVAL=$?
else
msg_not_running MYDNS >&2
exit 7
fi
;;
restart|force-reload)
$0 stop
sleep 3
$0 start
RETVAL=$?
;;
*)
msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
exit 3
esac
exit $RETVAL
-------------- next part --------------
# $Revision: 1.61 $, $Date: 2006/07/08 16:56:30 $
#
# Conditional build:
%bcond_with mysql # enable MySQL support
%bcond_with pgsql # enable PostgreSQL support
%bcond_with ssl # enable TLS/SSL support
#
Summary: MyDNS is a free Database Driven Nameserver
Summary(pl): MyDNS to 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}-configure.patch
URL: http://mydns.bboy.net/
BuildRequires: autoconf >= 2.59
BuildRequires: automake >= 1.96
BuildRequires: awk
%{?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
Obsoletes: mydns
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
MyDNS to darmowy serwer nazw zimplementowany od podstaw i
zaprojektowany aby udostępniać rekordy bezpośrednio z bazy SQL,
obecnie MySQL lub PostgreSQL.
%prep
%setup -q
%patch0 -p1
%build
%configure \
--disable-nls \
--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{%{_initrddir},%{_sysconfdir}/%{name},/etc/sysconfig}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_infodir}/dir*
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
install %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mydns
%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
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
%files
%defattr(644,root,root,755)
%doc ChangeLog AUTHORS BUGS README README.mysql INSTALL NEWS TODO QUICKSTART.*
%attr(754,root,root) %{_initrddir}/%{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:$
-------------- next part --------------
# Set nice level for mydns
SERVICE_RUN_NICE_LEVEL="+2"
More information about the pld-devel-pl
mailing list