]> git.pld-linux.org Git - packages/anope.git/blob - anope.spec
- NFY
[packages/anope.git] / anope.spec
1 Summary:        Internet Relay Chat Services
2 Summary(pl.UTF-8):Usługi dla sieci IRC
3 Name:           anope
4 Version:        1.7.18
5 Release:        1
6 License:        BSD-like or any GPL-compatible
7 Group:          Daemons
8 Source0:        http://dl.sourceforge.net/anope/%{name}-%{version}.tar.gz
9 # Source0-md5:  87b9e7a6a6129a9e9c8d07b135da4a4f
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Patch0: %{name}-fhs.patch
13 URL:            http://www.anope.org
14 BuildRequires:  autoconf
15 BuildRequires:  automake
16 BuildRequires:  mysql-devel
17 BuildRequires:  rpmbuild(macros) >= 1.202
18 BuildRequires:  zlib-devel
19 Requires(post,preun):   /sbin/chkconfig
20 Requires(postun):       /usr/sbin/groupdel
21 Requires(postun):       /usr/sbin/userdel
22 Requires(pre):  /bin/id
23 Requires(pre):  /usr/bin/getgid
24 Requires(pre):  /usr/sbin/groupadd
25 Requires(pre):  /usr/sbin/useradd
26 Requires:       rc-scripts
27 Provides:       group(anope)
28 Provides:       user(anope)
29 Obsoletes:      ircservices
30 Obsoletes:      ircservices-hybrid
31 Obsoletes:      ircservices-ptlink
32 Obsoletes:      ircservices6
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _sysconfdir     /etc/anope
36
37 %description
38 Anope IRC Services is a package of services for IRC networks.
39
40 %description -l pl.UTF-8
41 Anope IRC Services to pakiet z usługami dla sieci IRC (Internet Relay
42 Chat).
43
44 %prep
45 %setup -q
46 %patch0 -p1
47
48 %build
49 %{__aclocal}
50 %{__autoconf}
51 %configure \
52          --with-bindir=%{_sbindir} \
53          --with-datadir=%{_localstatedir}/lib/%{name}
54 %{__make} \
55         MODULE_PATH=%{_libdir}/%{name}/modules
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_localstatedir}/lib/%{name},%{_libdir}/%{name}/{modules,languages},%{_localstatedir}/log/ircservices,%{_sysconfdir}} \
60         $RPM_BUILD_ROOT%{_sbindir} \
61         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
62         $RPM_BUILD_ROOT%{_localstatedir}/log/anope/
63
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT \
66         BINDEST=$RPM_BUILD_ROOT%{_sbindir} \
67         MODULE_PATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/modules \
68         DATDEST=$RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
69
70 mv $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/example.conf $RPM_BUILD_ROOT%{_sysconfdir}/anope.conf
71
72 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/anope
73 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/anope
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %pre
79 %groupadd -f -g 218 anope
80 %useradd -g anope -d /var/lib/anope -u 218 -c "Anope IRC services account" -s /bin/true anope
81
82 %post
83 /sbin/chkconfig --add anope
84 %service %{name} restart "Anope IRC Services"
85
86 %preun
87 %service %{name} stop "Anope IRC Services"
88 /sbin/chkconfig --del anope
89
90 %postun
91 if [ "$1" = "0" ]; then
92         %userremove anope
93         %groupremove anope
94 fi
95
96 %files
97 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_sbindir}/*
99 %attr(750,root,anope) %dir %{_sysconfdir}
100 %attr(660,anope,anope) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
101 %attr(754,root,root) /etc/rc.d/init.d/%{name}
102 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
103 %attr(770,root,anope) %dir %{_localstatedir}/log/%{name}
104 %attr(770,root,anope) %dir %{_localstatedir}/lib/%{name}
105 %dir %{_libdir}/anope
106 %dir %{_libdir}/anope/modules
107 %attr(755,root,root) %{_libdir}/anope/modules/*.so
108 #%{_localstatedir}/lib/%{name}/example.chk
109 #%{_localstatedir}/lib/%{name}/example.conf
110 %dir %{_libdir}/anope/languages
111 %{_localstatedir}/lib/%{name}/languages/*
112 %{_localstatedir}/lib/%{name}/mydbgen
113 #%{_localstatedir}/lib/%{name}/tables.sql
This page took 0.0686909999999999 seconds and 3 git commands to generate.