]> git.pld-linux.org Git - packages/dcd.git/blob - dcd.spec
- 0.6.1 - security fixes (chat forgery). STBR, please.
[packages/dcd.git] / dcd.spec
1 Summary:        DConnect Daemon - Hub D****ct Connect for Linux
2 Summary(pl):    DConnect Daemon - Hub D****ct Connecta dla Linuksa
3 Name:           dcd
4 Version:        0.6.1
5 Release:        1
6 License:        GPL v2
7 Group:          Networking/Daemons
8 Vendor:         DConnect Team <dc-hub@ds.pg.gda.pl>
9 Source0:        ftp://pollux.ds.pg.gda.pl/pub/Linux/DConnect/sources/stable/%{name}-%{version}.tar.bz2
10 # Source0-md5:  35cc5d427004a3aa5ff46427f3b59a6a
11 URL:            http://www.dc.ds.pg.gda.pl/
12 BuildRequires:  autoconf >= 2.52
13 BuildRequires:  automake
14 BuildRequires:  libtool
15 BuildRequires:  libwrap-devel
16 Requires(post,preun):   /sbin/chkconfig
17 Requires(triggerpostun):        sed >= 4.0
18 Requires:       rc-scripts
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 This is Linux D*** Connect Hub implementation for Linux. It works in
23 daemon mode and utilizes threads.
24
25 %description -l pl
26 Pakiet zawiera linuksow± implementacjê huba D*** Connecta, który
27 pracuje jako demon i u¿ywa w±tków.
28
29 %prep
30 %setup -q
31
32 %build
33 %{__libtoolize}
34 %{__aclocal}
35 %{__autoconf}
36 %{__automake}
37 %configure \
38         --with-config-dir=%{_sysconfdir}/dcd \
39         --with-user=daemon \
40         --with-group=daemon
41
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d,logrotate.d},/var/log/archiv/dcd}
47
48 %{__make} install \
49         DESTDIR=$RPM_BUILD_ROOT
50
51 install contrib/PLD/dcd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/dcd
52 install contrib/dcd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/dcd
53 install contrib/logrotate.dcd $RPM_BUILD_ROOT/etc/logrotate.d/dcd
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 /sbin/chkconfig --add dcd
60 if [ -f /var/lock/subsys/dcd ]; then
61         /etc/rc.d/init.d/dcd restart 1>&2
62 else
63         echo "Run \"/etc/rc.d/init.d/dcd start\" to start DConnect Daemon."
64 fi
65
66 %preun
67 if [ "$1" = "0" ]; then
68         if [ -f /var/lock/subsys/dcd ]; then
69                 /etc/rc.d/init.d/dcd stop 1>&2
70         fi
71         /sbin/chkconfig --del dcd
72 fi
73
74 %triggerpostun -- dcd < 0.3.5
75 echo "Upgrading from version < 0.3.5"
76 if [ -e /etc/dcd/console.users.rpmsave ]; then
77         cp /etc/dcd/dcd.users /etc/dcd/dcd.users.rpmnew
78         cp /etc/dcd/console.users.rpmsave /etc/dcd/dcd.users
79 fi
80 umask 002
81 echo "Remember to review config - console users has been changed into dcd.users"
82 cp /etc/dcd/dcd.conf /etc/dcd/dcd.conf.rpmsave
83 sed -i -e 's/console.users/dcd.users/g' /etc/dcd/dcd.conf
84
85 %triggerpostun -- dcd < 0.4.6
86 echo "Upgrading from version < 0.4.6"
87 sed -i -e 's/minimum_sleep_time\b/minimal_sleep_time/' /etc/dcd/dcd.conf
88
89 %triggerpostun -- dcd < 0.4.9
90 echo "Upgrading from version < 0.4.9"
91 sed -i -e 's/ping_timeout/idle_timeout/' /etc/dcd/dcd.conf
92
93 %triggerpostun -- dcd < 0.5.5
94 echo "Upgrading from version < 0.5.5"
95 sed -i -e 's/listen_interface/bind_address/' /etc/dcd/dcd.conf
96
97 %files
98 %defattr(644,root,root,755)
99 %doc AUTHORS BUGS FAQ NEWS README TODO
100 %attr(755,daemon,root) %dir %{_sysconfdir}/dcd
101 %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/console.allow
102 %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.users
103 %attr(660,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.banned
104 %attr(664,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.penalties
105 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.conf
106 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.motd
107 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.welcome
108 %attr(664,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/nicks.allow
109 %attr(664,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.rules
110 %config(noreplace) /etc/sysconfig/dcd
111 %config(noreplace) /etc/logrotate.d/dcd
112 %attr(755,root,root) %{_sbindir}/dcd
113 %attr(755,root,root) %{_sbindir}/dcd.adduser
114 %attr(754,root,root) /etc/rc.d/init.d/dcd
115 %attr(751,daemon,root) %dir /var/log/dcd
116 %attr(751,daemon,root) %dir /var/log/archiv/dcd
117 %{_mandir}/man1/*.1*
118 %{_mandir}/man2/*.2*
This page took 0.064615 seconds and 3 git commands to generate.