]> git.pld-linux.org Git - packages/bircd.git/blobdiff - bircd.spec
- enable crypt oper pass in config file
[packages/bircd.git] / bircd.spec
index 570f3ed79c7c2cb9fa5e23c4114732d519e57ccd..93bee3cd0f7daf33c3a2c2dbc75ac49eee813aa2 100644 (file)
@@ -1,8 +1,12 @@
+#
+# Conditional build
+%bcond_with    smode   # build with /smode command support
+#
 Summary:       Internet Relay Chat Server
 Summary(pl):   Serwer IRC (Internet Relay Chat)
 Name:          bircd
 Version:       2.0.3rc6
-Release:       0.1
+Release:       3
 License:       GPL
 Group:         Daemons
 Source0:       http://www.onthanet.nl/~borg/download/%{name}%{version}.tgz
@@ -13,7 +17,9 @@ Source3:      %{name}.logrotate
 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
@@ -21,13 +27,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
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+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)
 
 %define                _sysconfdir     /etc/ircd
 %define                _localstatedir  /var/lib/ircd
@@ -36,7 +44,6 @@ Obsoletes:    ircd-ptlink
 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
@@ -47,6 +54,7 @@ IPv6.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%{?with_smode:%patch3 -p1}
 
 %build
 ./Config
@@ -88,7 +96,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
@@ -96,7 +104,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
@@ -120,10 +128,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
This page took 0.087027 seconds and 4 git commands to generate.