]> git.pld-linux.org Git - packages/bircd.git/blobdiff - bircd.spec
- rel 3 (rebuild with fixed %useradd/%groupadd macros)
[packages/bircd.git] / bircd.spec
index 93bee3cd0f7daf33c3a2c2dbc75ac49eee813aa2..89d4b5dde70028f00439549516c81648ff75c016 100644 (file)
@@ -1,40 +1,43 @@
 #
 # Conditional build
 %bcond_with    smode   # build with /smode command support
+%bcond_with    crypt   # build with crypted passwords support
 #
 Summary:       Internet Relay Chat Server
 Summary(pl):   Serwer IRC (Internet Relay Chat)
 Name:          bircd
-Version:       2.0.3rc6
+Version:       2.1.0rc1
 Release:       3
 License:       GPL
 Group:         Daemons
-Source0:       http://www.onthanet.nl/~borg/download/%{name}%{version}.tgz
-# Source0-md5: 2b59be1677db237521ae0c628511866c
+Source0:       ftp://ftp.benet.uu3.net/pub/irc/%{name}-%{version}.tgz
+# Source0-md5: 5e7b6b4ff8f3ed541d032c96eeee8de1
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.logrotate
+Source4:       %{name}.motd
 Patch0:                %{name}-makefile.patch
 Patch1:                %{name}-config.patch
-Patch2:                %{name}-fix.patch
-Patch3:                %{name}-smode.patch
-URL:           http://www.onthanet.nl/~borg/
-BuildRequires: rpmbuild(macros) >= 1.159
-PreReq:                rc-scripts
-Requires(pre): /usr/bin/getgid
-Requires(pre): /bin/id
-Requires(pre): /usr/sbin/groupadd
-Requires(pre): /usr/sbin/useradd
+Patch2:                %{name}-smode.patch
+Patch3:                %{name}-crypt.patch
+Patch4:                %{name}-%{version}-p1.patch
+URL:           http://www.benet.uu3.net/~borg/
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires:      rc-scripts
 Provides:      group(ircd)
 Provides:      user(ircd)
 Obsoletes:     ircd
-Obsoletes:     ircd6
 Obsoletes:     ircd-hybrid
 Obsoletes:     ircd-ptlink
+Obsoletes:     ircd6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/ircd
@@ -50,11 +53,12 @@ prosty w konfiguracji i u
 IPv6.
 
 %prep
-%setup -q -n bircd
+%setup -q -n %{name}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%{?with_smode:%patch3 -p1}
+%{?with_smode:%patch2 -p1}
+%{?with_crypt:%patch3 -p1}
+%patch4 -p1
 
 %build
 ./Config
@@ -73,16 +77,7 @@ install -d $RPM_BUILD_ROOT{%{_var}/log/{,archiv/}ircd,%{_sbindir}} \
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/ircd
-
-cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd
-
-Powered by \ 2PLD\ 2 \ 2L\ 2inux \ 2D\ 2istribution \ 2IRC Server\ 2!
-
-WWW\ 2:\ 2        \ 2http://www.pld-linux.org/\ 2
-FTP\ 2:\ 2        \ 2ftp://ftp.pld-linux.org/\ 2
-e-mail\ 2:\ 2      \ 2feedback@pld-linux.org\ 2
-
-EOF
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd
 
 touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.pid
 
@@ -90,40 +85,19 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.pid
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`getgid ircd`" ]; then
-       if [ "`getgid ircd`" != "75" ]; then
-               echo "Error: group ircd doesn't have gid=75. Correct this before installing ircd." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -f -g 75 ircd 2> /dev/null
-fi
-if [ -n "`id -u ircd 2>/dev/null`" ]; then
-       if [ "`id -u ircd`" != "75" ]; then
-               echo "Error: user ircd doesn't have uid=75. Correct this before installing ircd." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
-fi
+%groupadd -f -g 75 ircd
+%useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd
 
 %post
 /sbin/chkconfig --add ircd
-if [ -f /var/lock/subsys/ircd ]; then
-       /etc/rc.d/init.d/ircd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/ircd start\" to start IRC daemon."
-fi
+%service ircd restart "IRC daemon"
 touch /var/log/ircd/{opers.log,rejects.log,users.log}
 chmod 640 /var/log/ircd/*
 chown ircd:ircd /var/log/ircd/*
 
 %preun
-# If package is being erased for the last time.
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/ircd ]; then
-               /etc/rc.d/init.d/ircd stop 1>&2
-       fi
+       %service ircd stop
        /sbin/chkconfig --del ircd
 fi
 
@@ -144,8 +118,8 @@ fi
 %attr(770,root,ircd) %dir %{_localstatedir}
 %attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.pid
 %attr(750,root,ircd) %dir %{_sysconfdir}
-%attr(660,root,ircd) %config(noreplace) %{_sysconfdir}/ircd.conf
-%attr(664,root,ircd) %{_sysconfdir}/ircd.motd
+%attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf
+%attr(660,root,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd
 %attr(754,root,root) /etc/rc.d/init.d/ircd
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ircd
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/ircd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ircd
This page took 0.072438 seconds and 4 git commands to generate.