]>
Commit | Line | Data |
---|---|---|
e3a84575 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static libraries | |
4 | %bcond_without tests # "make check" | |
5 | ||
e3a84575 | 6 | Summary: Courier Socks 5 client libraries |
999ec334 | 7 | Summary(pl.UTF-8): Biblioteki klienckie Socks 5 |
20b45069 | 8 | Name: courier-sox |
38596fcd | 9 | Version: 0.18 |
9ef25f8d | 10 | Release: 1 |
e3a84575 JB |
11 | License: GPL v3 with OpenSSL exception |
12 | Group: Networking/Utilities | |
9ef25f8d | 13 | Source0: https://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2 |
38596fcd | 14 | # Source0-md5: 3fdec8533474aac2e9d6864bb79657f8 |
7aaa0b89 | 15 | Patch0: %{name}-init.patch |
e3a84575 | 16 | URL: http://www.courier-mta.org/ |
3163af7a | 17 | BuildRequires: courier-authlib-devel >= 0.71 |
792b78ab | 18 | BuildRequires: gdbm-devel |
e3a84575 JB |
19 | BuildRequires: libltdl-devel >= 2:2.0 |
20 | BuildRequires: perl-base | |
21 | BuildRequires: rpm-perlprov | |
4eddd7a5 | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
20b45069 AA |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
f2a2ac52 | 26 | This is a generic Socks 5 client support library. |
20b45069 | 27 | |
402ceac4 JR |
28 | %description -l pl.UTF-8 |
29 | Ogólna biblioteka kliencka Socks 5. | |
20b45069 AA |
30 | |
31 | %package devel | |
32 | Summary: Socks 5 client header files | |
999ec334 | 33 | Summary(pl.UTF-8): Pliki nagłówkowe klienta socks 5 |
20b45069 AA |
34 | Group: Development/Libraries |
35 | Requires: %{name} = %{version}-%{release} | |
36 | ||
37 | %description devel | |
21e44a56 AA |
38 | This package contains header files for building applications that use |
39 | Socks 5 proxies. | |
20b45069 | 40 | |
402ceac4 JR |
41 | %description devel -l pl.UTF-8 |
42 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji używających | |
38bc9b38 | 43 | proxy Socks 5. |
20b45069 AA |
44 | |
45 | %package static | |
46 | Summary: Socks 5 client static libraries | |
999ec334 | 47 | Summary(pl.UTF-8): Biblioteki statyczne klienta socks 5 |
20b45069 AA |
48 | Group: Development/Libraries |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
52 | This package contains static libraries for building applications that | |
53 | use Socks 5 proxies. | |
54 | ||
402ceac4 | 55 | %description static -l pl.UTF-8 |
38bc9b38 | 56 | Ten pakiet zawiera biblioteki statyczne do tworzenia aplikacji |
402ceac4 | 57 | używających proxy Socks 5. |
20b45069 | 58 | |
e3a84575 JB |
59 | %package server |
60 | Summary: Socks 5 server | |
61 | Summary(pl.UTF-8): Serwer socks 5 | |
62 | Group: Networking/Daemons | |
63 | Requires(post,preun): /sbin/chkconfig | |
64 | Requires: %{name} = %{version}-%{release} | |
ff1e2eac | 65 | # requires library and courierlogger |
3163af7a | 66 | Requires: courier-authlib >= 0.71 |
e3a84575 JB |
67 | |
68 | %description server | |
69 | This package contains the Courier Socks 5 server. | |
70 | ||
71 | %description server -l pl.UTF-8 | |
72 | Ten pakiet zawiera serwer Courier Socks 5. | |
73 | ||
20b45069 AA |
74 | %prep |
75 | %setup -q | |
5df92ee5 | 76 | %patch0 -p1 |
20b45069 AA |
77 | |
78 | %build | |
8bcc40fe | 79 | %configure \ |
e3a84575 JB |
80 | --libexecdir=%{_libexecdir}/courier-sox \ |
81 | %{!?with_static_libs:--disable-static} | |
20b45069 AA |
82 | |
83 | %{__make} | |
e3a84575 JB |
84 | |
85 | %if %{with tests} | |
20b45069 | 86 | %{__make} check |
e3a84575 | 87 | %endif |
20b45069 AA |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %{__make} install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT | |
94 | ||
e3a84575 | 95 | install -D courier-sox.sysvinit $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-sox |
21e44a56 | 96 | |
20b45069 AA |
97 | %clean |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
38bc9b38 JB |
100 | %post -p /sbin/ldconfig |
101 | %postun -p /sbin/ldconfig | |
102 | ||
21e44a56 AA |
103 | %post server |
104 | /sbin/chkconfig --add courier-sox | |
4eddd7a5 | 105 | %service courier-sox restart |
21e44a56 AA |
106 | |
107 | %preun server | |
108 | if [ "$1" = "0" ]; then | |
4eddd7a5 | 109 | %service courier-sox stop |
21e44a56 AA |
110 | /sbin/chkconfig --del courier-sox |
111 | fi | |
112 | ||
20b45069 AA |
113 | %files |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS ChangeLog NEWS README *.html | |
e3a84575 JB |
116 | %attr(755,root,root) %{_bindir}/mkbl4 |
117 | %attr(755,root,root) %{_bindir}/socksify | |
118 | %attr(755,root,root) %{_libdir}/libsocks.so.*.*.* | |
119 | %attr(755,root,root) %ghost %{_libdir}/libsocks.so.0 | |
120 | %attr(755,root,root) %{_libdir}/libsockswrap.so.*.*.* | |
121 | %attr(755,root,root) %ghost %{_libdir}/libsockswrap.so.0 | |
122 | %{_mandir}/man1/socksify.1* | |
123 | %{_mandir}/man5/socksrc.5* | |
124 | %{_mandir}/man8/mkbl4.8* | |
125 | %dir %{_sysconfdir}/socksrc | |
126 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/socksrc/system | |
20b45069 AA |
127 | |
128 | %files devel | |
129 | %defattr(644,root,root,755) | |
e3a84575 JB |
130 | %attr(755,root,root) %{_libdir}/libsocks.so |
131 | %attr(755,root,root) %{_libdir}/libsockswrap.so | |
132 | %{_libdir}/libsocks.la | |
133 | %{_libdir}/libsockswrap.la | |
134 | %{_includedir}/socks.h | |
135 | %{_mandir}/man3/socks.3* | |
136 | ||
137 | %if %{with static_libs} | |
138 | %files static | |
139 | %defattr(644,root,root,755) | |
140 | %{_libdir}/libsocks.a | |
141 | %{_libdir}/libsockswrap.a | |
142 | %endif | |
20b45069 | 143 | |
21e44a56 AA |
144 | %files server |
145 | %defattr(644,root,root,755) | |
146 | %attr(754,root,root) /etc/rc.d/init.d/courier-sox | |
21e44a56 | 147 | %attr(755,root,root) %{_sbindir}/sockd |
e3a84575 JB |
148 | %dir %{_libexecdir}/courier-sox |
149 | %attr(755,root,root) %{_libexecdir}/courier-sox/sockd | |
150 | %{_mandir}/man1/sockd.1* |