]> git.pld-linux.org Git - packages/bircd.git/blobdiff - bircd.spec
- updated to 2.0.3rc11
[packages/bircd.git] / bircd.spec
index ca562ad78d4ebbb9f182872e0ccdfd62b7643989..4f0909dcfe27b206059b65d33efc643d112c5a1c 100644 (file)
@@ -1,19 +1,28 @@
+#
+# 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
-Release:       0.1
+Version:       2.0.3rc11
+Release:       1
 License:       GPL
 Group:         Daemons
-Source0:       http://www.onthanet.nl/~borg/download/%{name}%{version}.tgz
-# Source0-md5: 2b59be1677db237521ae0c628511866c
+Source0:       ftp://ftp.benet.uu3.net/pub/ircd/%{name}-%{version}.tgz
+# Source0-md5: b6b28fecb070c2695797105abf9929f1
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.logrotate
+Source4:       %{name}.motd
 Patch0:                %{name}-makefile.patch
 Patch1:                %{name}-config.patch
-Patch2:                %{name}-fix.patch
-URL:           http://www.onthanet.nl/~borg/
+Patch2:                %{name}-smode.patch
+Patch3:                %{name}-crypt.patch
+Patch4:                %{name}-fix.patch
+URL:           http://www.benet.uu3.net/~borg/
+BuildRequires: rpmbuild(macros) >= 1.159
 PreReq:                rc-scripts
 Requires(pre): /usr/bin/getgid
 Requires(pre): /bin/id
@@ -21,11 +30,15 @@ Requires(pre):      /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
-Requires(postun):      /usr/sbin/userdel
 Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Provides:      group(ircd)
+Provides:      user(ircd)
+Obsoletes:     ircd
+Obsoletes:     ircd6
+Obsoletes:     ircd-hybrid
+Obsoletes:     ircd-ptlink
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Conflicts:     ircd
-Conflicts:     ircd-hybrid
 
 %define                _sysconfdir     /etc/ircd
 %define                _localstatedir  /var/lib/ircd
@@ -34,21 +47,23 @@ Conflicts:  ircd-hybrid
 bIRCd is a small, simple and very fast IRC server. It is easy to
 configure and use. It also has support for IPv6.
 
-
 %description -l pl
 bIRCd jest ma³ym, prostym i bardzo szybkim serwerem IRC. Jest bardzo
 prosty w konfiguracji i u¿ytkowaniu. Posiada równie¿ wsparcie dla
 IPv6.
 
 %prep
-%setup -q -n bircd
+%setup -q -n %{name}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+%{?with_smode:%patch2 -p1}
+%{?with_crypt:%patch3 -p1}
+%patch4 -p1
 
 %build
 ./Config
-%{__make}
+%{__make} \
+       LIBDIR=%{_libdir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -62,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
 
@@ -85,7 +91,7 @@ if [ -n "`getgid ircd`" ]; then
                exit 1
        fi
 else
-       %{_sbindir}/groupadd -f -g 75 ircd 2> /dev/null
+       /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
@@ -93,7 +99,7 @@ if [ -n "`id -u ircd 2>/dev/null`" ]; then
                exit 1
        fi
 else
-       %{_sbindir}/useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
+       /usr/sbin/useradd -g ircd -d /etc/ircd -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
 fi
 
 %post
@@ -117,10 +123,9 @@ if [ "$1" = "0" ]; then
 fi
 
 %postun
-# If package is being erased for the last time.
 if [ "$1" = "0" ]; then
-       %{_sbindir}/userdel ircd 2> /dev/null
-       %{_sbindir}/groupdel ircd 2> /dev/null
+       %userremove ircd
+       %groupremove ircd
 fi
 
 %files
@@ -134,8 +139,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.085338 seconds and 4 git commands to generate.