]> git.pld-linux.org Git - packages/dcd.git/blob - dcd.spec
- 0.5.1 - devel
[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.5.1
5 Release:        0.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/devel/%{name}-%{version}.tar.bz2
10 # Source0-md5:  5272141f5a7e9ee70d506f031de9c611
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 PreReq:         rc-scripts
17 PreReq:         sed >= 4.0
18 Requires(post,preun):   /sbin/chkconfig
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{%{_sysconfdir}/{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%{_sysconfdir}/rc.d/init.d/dcd
52 install contrib/dcd.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/dcd
53 install contrib/logrotate.dcd $RPM_BUILD_ROOT%{_sysconfdir}/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 -e s/console.users/dcd.users/g /etc/dcd/dcd.conf >/etc/dcd/dcd.conf.tmp
84 mv -f /etc/dcd/dcd.conf.tmp /etc/dcd/dcd.conf
85
86 %triggerpostun -- dcd < 0.4.6
87 echo "Upgrading from version < 0.4.6"
88 sed -i -e 's/minimum_sleep_time\b/minimal_sleep_time/' /etc/dcd/dcd.conf
89
90 %triggerpostun -- dcd < 0.4.9
91 echo "Upgrading from version < 0.4.9"
92 sed -i -e 's/ping_timeout/idle_timeout/' /etc/dcd/dcd.conf
93
94 %files
95 %defattr(644,root,root,755)
96 %doc AUTHORS BUGS FAQ NEWS README TODO
97 %attr(755,daemon,root) %dir %{_sysconfdir}/dcd
98 %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/console.allow
99 %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.users
100 %attr(660,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.banned
101 %attr(664,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.penalties
102 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.conf
103 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.motd
104 %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.welcome
105 %attr(664,daemon,daemon) %config(noreplace) %{_sysconfdir}/dcd/nicks.allow
106 %config(noreplace) %{_sysconfdir}/sysconfig/dcd
107 %config(noreplace) %{_sysconfdir}/logrotate.d/dcd
108 %attr(755,root,root) %{_sbindir}/dcd
109 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/dcd
110 %attr(751,daemon,root) %dir /var/log/dcd
111 %attr(751,daemon,root) %dir /var/log/archiv/dcd
112 %{_mandir}/man1/*.1*
113 %{_mandir}/man2/*.2*
This page took 0.078702 seconds and 3 git commands to generate.