]> git.pld-linux.org Git - packages/ircd-hybrid.git/blob - ircd-hybrid.spec
6e04840dbee2e0d92998ab19c8e2fabf7d4b8c67
[packages/ircd-hybrid.git] / ircd-hybrid.spec
1 # TODO:
2 # - modify to use system available shared adns library.
3 # - rewrite ipv6 support to work with non-v6 systems
4 #
5 # Conditional build:
6 %bcond_with     ipv6            # - enable ipv6 support - do not use for v4-only machines.
7 %bcond_with     ssl             # - enable use ssl
8 %bcond_with     longnicks       # - enable long nicknames.  All servers on the network must use the same length.
9 %bcond_with     longtopics      # - enable long topics.  All servers on the network must use the same length.
10 #
11 Summary:        Internet Relay Chat Server
12 Summary(pl.UTF-8):      Serwer IRC
13 Name:           ircd-hybrid
14 Version:        7.0.3
15 Release:        5
16 Epoch:          1
17 License:        GPL v2
18 Group:          Daemons
19 Source0:        http://downloads.sourceforge.net/ircd-hybrid/%{name}-%{version}.tgz
20 # Source0-md5:  5e5d93dbd55e6865d75ee18a2b56170f
21 Source1:        %{name}.init
22 Source2:        %{name}.sysconfig
23 Source3:        %{name}.conf
24 Patch0:         %{name}-config.patch
25 Patch1:         %{name}-change_uid.patch
26 Patch2:         %{name}-opt.patch
27 Patch3:         %{name}-open-3-args.patch
28 URL:            http://www.ircd-hybrid.org/
29 BuildRequires:  autoconf
30 BuildRequires:  automake
31 BuildRequires:  bison
32 BuildRequires:  flex
33 BuildRequires:  gettext-devel
34 BuildRequires:  rpmbuild(macros) >= 1.268
35 BuildRequires:  zlib-devel
36 Requires(post,preun):   /sbin/chkconfig
37 Requires(postun):       /usr/sbin/groupdel
38 Requires(postun):       /usr/sbin/userdel
39 Requires(pre):  /bin/id
40 Requires(pre):  /usr/bin/getgid
41 Requires(pre):  /usr/sbin/groupadd
42 Requires(pre):  /usr/sbin/useradd
43 Requires:       rc-scripts
44 Provides:       group(ircd)
45 Provides:       user(ircd)
46 Obsoletes:      bircd
47 Obsoletes:      ircd
48 Obsoletes:      ircd-ptlink
49 Obsoletes:      ircd6
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         _sysconfdir     /etc/ircd
53 %define         _localstatedir  /var/lib/ircd
54
55 %description
56 Ircd-hybrid is an advanced IRC server which is most commonly used on
57 the EFNet IRC network. It is fast, reliable, and powerful. This
58 version supports IPv6.
59
60 %description -l pl.UTF-8
61 Ircd-hybrid jest zaawansowanym serwerem IRC, najczęściej używanym w
62 sieci EFNet. Jest szybki, stabilny i wydajny. Ta wersja obsługuje
63 IPv6.
64
65 %prep
66 %setup -q
67 %patch0 -p1
68 %patch1 -p1
69 %patch2 -p1
70 %patch3 -p1
71
72 %build
73 mv -f autoconf/{configure.in,acconfig.h} .
74 cp -f %{_datadir}/automake/config.* autoconf
75 %{__gettextize}
76 %{__aclocal}
77 %{__autoconf}
78 CFLAGS="%{rpmcflags} %{?debug:-DDEBUGMODE}"
79 %configure \
80         --enable-zlib \
81         %{?with_ipv6:--enable-ipv6} \
82         --enable-small-net \
83         %{?with_longnicks:--with-nicklen=20} \
84         %{?with_longtopics:--with-topiclen=500} \
85         %{?with_ssl:--enable-openssl} \
86         %{!?with_ssl:--disable-openssl} \
87         --enable-shared-modules \
88         --with-maxclients=512
89 %{__make}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{_libdir}/ircd,%{_var}/log/ircd,%{_sysconfdir}} \
94         $RPM_BUILD_ROOT{%{_libdir}/ircd/{modules{,/autoload},tools,help},%{_sbindir},%{_mandir}/man8} \
95         $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_localstatedir},/var/run/ircd}
96
97 install src/ircd $RPM_BUILD_ROOT%{_sbindir}/ircd
98 install servlink/servlink $RPM_BUILD_ROOT%{_sbindir}/servlink
99 install doc/ircd.8 $RPM_BUILD_ROOT%{_mandir}/man8
100 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ircd
101 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ircd
102 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ircd.conf
103 touch $RPM_BUILD_ROOT{%{_sysconfdir}/{{dline,kline}.conf,{ircd,opers}.motd},%{_var}/log/ircd/{foper,oper,user}.log}
104
105 cd modules
106         install *.so $RPM_BUILD_ROOT%{_libdir}/ircd/modules/autoload
107         cd core
108                 install *.so $RPM_BUILD_ROOT%{_libdir}/ircd/modules
109         cd ..
110 cd ..
111
112 cd tools
113         for i in convertconf convertilines convertklines encspeed mkkeypair mkpasswd untabify viconf; do
114                 install $i $RPM_BUILD_ROOT%{_libdir}/ircd/tools/$i
115         done
116 cd ..
117
118 cd help
119         cp -rf opers users $RPM_BUILD_ROOT%{_libdir}/ircd/help
120 cd ..
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %pre
126 %groupadd -f -g 75 ircd
127 %useradd -g ircd -d /etc/ircd -u 75 -c "IRC service account" -s /bin/true ircd
128
129 %post
130 /sbin/chkconfig --add ircd
131 %service ircd restart "IRC daemon"
132
133 %preun
134 if [ "$1" = "0" ]; then
135         %service ircd stop
136         /sbin/chkconfig --del ircd
137 fi
138
139 %postun
140 if [ "$1" = "0" ]; then
141         %userremove ircd
142         %groupremove ircd
143 fi
144
145 %files
146 %defattr(644,root,root,755)
147 %doc doc/{*.txt,*.conf,server-version-info,technical} RELNOTES ChangeLog Hybrid-team BUGS TODO
148 %attr(755,root,root) %{_sbindir}/*
149 %attr(770,root,ircd) %dir %{_sysconfdir}
150 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.conf
151 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dline.conf
152 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kline.conf
153 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ircd.motd
154 %attr(660,ircd,ircd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opers.motd
155 %attr(754,root,root) /etc/rc.d/init.d/ircd
156 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ircd
157 %dir %{_libdir}/ircd
158 %dir %{_libdir}/ircd/modules
159 %dir %{_libdir}/ircd/tools
160 %dir %{_libdir}/ircd/help
161 %attr(755,root,root) %{_libdir}/ircd/modules/*
162 %attr(755,root,root) %{_libdir}/ircd/tools/*
163 %{_libdir}/ircd/help/*
164 %attr(770,root,ircd) %dir %{_var}/log/ircd
165 %attr(700,ircd,ircd) %ghost %{_var}/log/ircd/*
166 %attr(770,root,ircd) %dir %{_localstatedir}
167 %{_mandir}/man*/*
168 %attr(770,ircd,ircd) %dir /var/run/ircd
This page took 0.135659 seconds and 2 git commands to generate.