]>
Commit | Line | Data |
---|---|---|
592944db | 1 | Summary: Direct Connect Hub |
c81e34d1 | 2 | Summary(pl.UTF-8): Serwer Direct Connect |
592944db | 3 | Name: dchub |
5cea99be | 4 | Version: 0.5.2 |
2bf74e5d | 5 | Release: 23 |
592944db | 6 | License: GPL |
7 | Group: Applications/Communications | |
6fe92417 | 8 | Source0: http://ac2i.homelinux.com/dctc/%{name}-%{version}.tar.gz |
5cea99be AA |
9 | # Source0-md5: 673a43cde95bce2c2acba2cfab83d527 |
10 | Patch0: %{name}-configdir.patch | |
11 | Patch1: %{name}-init.patch | |
655eb505 | 12 | Patch2: %{name}-crcdir.patch |
65bf7e48 | 13 | Patch3: %{name}-pic.patch |
85aa2ee9 | 14 | Patch4: am.patch |
d81ef06b | 15 | Patch5: format-security.patch |
c3765a83 | 16 | Patch6: trampoline.patch |
186af035 | 17 | Patch7: missing-extern.patch |
6fe92417 | 18 | URL: http://ac2i.homelinux.com/dctc/ |
5cea99be AA |
19 | BuildRequires: autoconf |
20 | BuildRequires: automake | |
68053d57 | 21 | BuildRequires: gettext-tools |
0a06c42c | 22 | # for AM_PATH_GLIB macro |
23 | BuildRequires: glib-devel | |
65bf7e48 | 24 | BuildRequires: glib2-devel >= 2.0 |
b5e2cd20 JB |
25 | BuildRequires: libgcrypt-devel >= 1.1.12 |
26 | BuildRequires: libxml2-devel | |
0a06c42c | 27 | BuildRequires: openssl-devel |
b5e2cd20 | 28 | BuildRequires: perl-devel |
a7bfde9a | 29 | BuildRequires: pkgconfig |
51175287 | 30 | BuildRequires: python-devel |
9905e57e | 31 | BuildRequires: rpmbuild(macros) >= 1.268 |
6fe92417 | 32 | Requires(post,preun): /sbin/chkconfig |
51175287 | 33 | Requires: perl-Locale-gettext |
846b2d68 | 34 | Requires: rc-scripts |
592944db | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
5cea99be | 38 | dchub is a hub of direct connect file sharing network. |
592944db | 39 | |
b187845e JR |
40 | %description -l pl.UTF-8 |
41 | dchub jest hubem sieci direct connect służącej do wymiany plików. | |
592944db | 42 | |
43 | %prep | |
44 | %setup -q | |
5cea99be AA |
45 | %patch0 -p1 |
46 | %patch1 -p1 | |
655eb505 | 47 | %patch2 -p1 |
65bf7e48 | 48 | %patch3 -p1 |
85aa2ee9 | 49 | %patch4 -p1 |
d81ef06b | 50 | %patch5 -p1 |
c3765a83 | 51 | %patch6 -p1 |
186af035 | 52 | %patch7 -p1 |
592944db | 53 | |
54 | %build | |
5cea99be AA |
55 | %{__aclocal} |
56 | %{__autoconf} | |
57 | %{__automake} | |
58 | %configure | |
c680ecbc | 59 | |
592944db | 60 | %{__make} |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
c13429cd ER |
64 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/rc.d/init.d,/var/lib/%{name}} |
65 | install dchub.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} | |
592944db | 66 | |
67 | %{__make} install \ | |
68 | DESTDIR=$RPM_BUILD_ROOT | |
69 | ||
30696423 | 70 | install plugin/AUTOSTART $RPM_BUILD_ROOT%{_libexecdir}/%{name}/plugins/AUTOSTART |
5cea99be | 71 | |
5cea99be | 72 | # delete unnecesary files |
30696423 JR |
73 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/%{name}/plugins/Makefile |
74 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/%{name}/plugins/*.c | |
75 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/%{name}/plugins/*.h | |
76 | %{__rm} -r $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/po | |
5cea99be | 77 | |
846b2d68 JB |
78 | %clean |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
5cea99be | 81 | %post |
9905e57e ER |
82 | /sbin/chkconfig --add dchub |
83 | %service dchub restart | |
5cea99be | 84 | |
a600676e | 85 | %preun |
6fe92417 | 86 | if [ "$1" = "0" ]; then |
a600676e | 87 | /sbin/chkconfig --del dchub |
9905e57e | 88 | %service dchub stop |
5cea99be AA |
89 | fi |
90 | ||
592944db | 91 | %files |
92 | %defattr(644,root,root,755) | |
8110666c JB |
93 | %doc AUTHORS ChangeLog NEWS README TODO |
94 | %doc Documentation/{Global,commands,configuration_file,ext_prog,hub_cluster.postv0.4.0,plugin,protocol_extension,scripts,user_file} | |
95 | %lang(de) %doc Documentation/*.de | |
96 | %lang(fr) %doc Documentation/*.fr | |
97 | %lang(nl) %doc Documentation/*.nl | |
5cea99be | 98 | %dir %{_sysconfdir}/%{name} |
51175287 | 99 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
592944db | 100 | %attr(755,root,root) %{_bindir}/* |
30696423 JR |
101 | %dir %{_libexecdir}/%{name} |
102 | %dir %{_libexecdir}/%{name}/tools | |
103 | %attr(755,root,root) %{_libexecdir}/%{name}/tools/* | |
104 | %dir %{_libexecdir}/%{name}/extprog | |
105 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/%{name}/extprog/AUTOSTART | |
106 | %attr(755,root,root) %{_libexecdir}/%{name}/extprog/[CDPdm]* | |
107 | %dir %{_libexecdir}/%{name}/plugins | |
108 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/%{name}/plugins/AUTOSTART | |
109 | %attr(755,root,root) %{_libexecdir}/%{name}/plugins/*.so | |
110 | %dir %{_libexecdir}/%{name}/scripts | |
111 | %attr(755,root,root) %{_libexecdir}/%{name}/scripts/*.pl | |
112 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/%{name}/scripts/dchub_scripts.conf | |
113 | %dir %{_libexecdir}/%{name}/scripts/i18n | |
114 | %lang(de) %{_libexecdir}/%{name}/scripts/i18n/de | |
115 | %lang(fr) %{_libexecdir}/%{name}/scripts/i18n/fr | |
116 | %lang(hu) %{_libexecdir}/%{name}/scripts/i18n/hu | |
117 | %lang(sv) %{_libexecdir}/%{name}/scripts/i18n/sv | |
655eb505 AA |
118 | %dir %{_datadir}/%{name} |
119 | %{_datadir}/%{name}/* | |
c24730d4 | 120 | %dir /var/lib/%{name} |