]> git.pld-linux.org Git - packages/bircd.git/blobdiff - bircd.spec
- patch4 included in sources, removed
[packages/bircd.git] / bircd.spec
index cd743e1ade4a8c53e95169a0b95ecf193f36cf47..68ce14323b457d4d6617a1c433af9104c9fdffcc 100644 (file)
@@ -6,12 +6,14 @@
 Summary:       Internet Relay Chat Server
 Summary(pl):   Serwer IRC (Internet Relay Chat)
 Name:          bircd
-Version:       2.0.3rc10
-Release:       1
+%define         _rc     rc2
+%define         _rel    1
+Version:       2.1.0
+Release:       0.%{_rc}.%{_rel}
 License:       GPL
 Group:         Daemons
-Source0:       ftp://ftp.benet.uu3.net/pub/ircd/%{name}%{version}.tgz
-# Source0-md5: dae79e6939428e3052ae2a053ebd191d
+Source0:       ftp://ftp.benet.uu3.net/pub/irc/%{name}-%{version}%{_rc}.tgz
+# Source0-md5: 03ba33362b131fc0441d9f1724207bf7
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.logrotate
@@ -21,22 +23,22 @@ Patch1:             %{name}-config.patch
 Patch2:                %{name}-smode.patch
 Patch3:                %{name}-crypt.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
-Requires(pre): /usr/sbin/groupadd
-Requires(pre): /usr/sbin/useradd
+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
@@ -83,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
 
This page took 0.04289 seconds and 4 git commands to generate.