]>
Commit | Line | Data |
---|---|---|
8b424730 | 1 | Summary: DConnect Daemon - Hub D****ct Connect for Linux |
0eedff0f | 2 | Summary(pl.UTF-8): DConnect Daemon - Hub D****ct Connecta dla Linuksa |
8b424730 | 3 | Name: dcd |
cc9d51d1 | 4 | Version: 1.0.1 |
97fa61ac | 5 | Release: 1 |
8b424730 PG |
6 | License: GPL v2 |
7 | Group: Networking/Daemons | |
02f78fed | 8 | Source0: ftp://pollux.ds.pg.gda.pl/pub/Linux/DConnect/sources/stable/%{name}-%{version}.tar.bz2 |
cc9d51d1 | 9 | # Source0-md5: fb3f772f25d3bbcdb5c31d66e04d8773 |
888449ab | 10 | URL: http://www.dc.ds.pg.gda.pl/ |
afea0be5 | 11 | BuildRequires: autoconf >= 2.52 |
f7f8312c | 12 | BuildRequires: automake |
13 | BuildRequires: libtool | |
8b424730 | 14 | BuildRequires: libwrap-devel |
ead3401a | 15 | BuildRequires: rpmbuild(macros) >= 1.268 |
dfd9c578 | 16 | Requires(post,preun): /sbin/chkconfig |
e7964a8b JB |
17 | Requires(triggerpostun): sed >= 4.0 |
18 | Requires: rc-scripts | |
8b424730 PG |
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 | |
8470c075 | 23 | daemon mode and utilizes threads. |
8b424730 | 24 | |
0eedff0f JR |
25 | %description -l pl.UTF-8 |
26 | Pakiet zawiera linuksową implementację huba D*** Connecta, który | |
27 | pracuje jako demon i używa wątków. | |
8b424730 PG |
28 | |
29 | %prep | |
30 | %setup -q | |
31 | ||
32 | %build | |
7092379a | 33 | %{__libtoolize} |
df460fae | 34 | %{__aclocal} |
151851d1 | 35 | %{__autoconf} |
36 | %{__automake} | |
d24224df | 37 | %configure \ |
50c74fe1 | 38 | --with-config-dir=%{_sysconfdir}/dcd \ |
afea0be5 PG |
39 | --with-user=daemon \ |
40 | --with-group=daemon | |
8b424730 | 41 | |
8c68b212 | 42 | %{__make} |
8b424730 PG |
43 | |
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
560c7cdc | 46 | install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d,logrotate.d},/var/log/archiv/dcd} |
8b424730 | 47 | |
c068d641 PG |
48 | %{__make} install \ |
49 | DESTDIR=$RPM_BUILD_ROOT | |
8b424730 | 50 | |
560c7cdc | 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 | |
8b424730 | 54 | |
8b424730 PG |
55 | %clean |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | /sbin/chkconfig --add dcd | |
ead3401a | 60 | %service dcd restart "DConnect Daemon" |
8b424730 PG |
61 | |
62 | %preun | |
63 | if [ "$1" = "0" ]; then | |
ead3401a | 64 | %service dcd stop |
53d23e2c | 65 | /sbin/chkconfig --del dcd |
8b424730 PG |
66 | fi |
67 | ||
dfaf74a6 PG |
68 | %triggerpostun -- dcd < 0.3.5 |
69 | echo "Upgrading from version < 0.3.5" | |
70 | if [ -e /etc/dcd/console.users.rpmsave ]; then | |
71 | cp /etc/dcd/dcd.users /etc/dcd/dcd.users.rpmnew | |
72 | cp /etc/dcd/console.users.rpmsave /etc/dcd/dcd.users | |
73 | fi | |
b32eea95 | 74 | umask 002 |
dfaf74a6 PG |
75 | echo "Remember to review config - console users has been changed into dcd.users" |
76 | cp /etc/dcd/dcd.conf /etc/dcd/dcd.conf.rpmsave | |
e7964a8b | 77 | sed -i -e 's/console.users/dcd.users/g' /etc/dcd/dcd.conf |
afea0be5 | 78 | |
92795a39 PG |
79 | %triggerpostun -- dcd < 0.4.6 |
80 | echo "Upgrading from version < 0.4.6" | |
67b0c7b4 | 81 | sed -i -e 's/minimum_sleep_time\b/minimal_sleep_time/' /etc/dcd/dcd.conf |
92795a39 | 82 | |
4734f1d4 PG |
83 | %triggerpostun -- dcd < 0.4.9 |
84 | echo "Upgrading from version < 0.4.9" | |
85 | sed -i -e 's/ping_timeout/idle_timeout/' /etc/dcd/dcd.conf | |
86 | ||
eab97d81 PG |
87 | %triggerpostun -- dcd < 0.5.5 |
88 | echo "Upgrading from version < 0.5.5" | |
89 | sed -i -e 's/listen_interface/bind_address/' /etc/dcd/dcd.conf | |
90 | ||
8b424730 PG |
91 | %files |
92 | %defattr(644,root,root,755) | |
347b0e32 | 93 | %doc AUTHORS BUGS FAQ NEWS README TODO USERCOMMANDS |
275da6bd PG |
94 | %attr(755,daemon,root) %dir %{_sysconfdir}/dcd |
95 | %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/console.allow | |
dfaf74a6 | 96 | %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.users |
749db3ee PG |
97 | %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.banned |
98 | %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.hublinks | |
99 | %attr(660,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.usercommands | |
100 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.penalties | |
275da6bd PG |
101 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.conf |
102 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.motd | |
103 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.welcome | |
749db3ee PG |
104 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/nicks.allow |
105 | %attr(664,root,daemon) %config(noreplace) %{_sysconfdir}/dcd/dcd.rules | |
ead3401a | 106 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dcd |
560c7cdc | 107 | %config(noreplace) /etc/logrotate.d/dcd |
8b424730 | 108 | %attr(755,root,root) %{_sbindir}/dcd |
e7c9c3f4 | 109 | %attr(755,root,root) %{_sbindir}/dcd.adduser |
560c7cdc | 110 | %attr(754,root,root) /etc/rc.d/init.d/dcd |
275da6bd PG |
111 | %attr(751,daemon,root) %dir /var/log/dcd |
112 | %attr(751,daemon,root) %dir /var/log/archiv/dcd | |
113 | %{_mandir}/man1/*.1* | |
114 | %{_mandir}/man2/*.2* |