|
1 |
| -Name: shadowsocks-libev |
2 |
| -Version: 2.1.4 |
3 |
| -Release: 1%{?dist} |
4 |
| -Summary: A lightweight secured socks5 proxy for embedded devices and low end boxes. |
| 1 | +Name: shadowsocks-libev |
| 2 | +Version: 2.4.0 |
| 3 | +Release: 1%{?dist} |
| 4 | +Summary: A lightweight and secure socks5 proxy |
5 | 5 |
|
6 |
| -License: GPLv3+ |
7 |
| -URL: https://github.com/shadowsocks/shadowsocks-libev |
8 |
| -Source0: %{name}-%{version}.tar.xz |
9 |
| -Source1: shadowsocks@.service |
10 |
| -Source2: shadowsocks-server@.service |
| 6 | +Group: Applications/Internet |
| 7 | +License: GPLv3+ |
| 8 | +URL: https://github.com/madeye/%{name} |
| 9 | +Source0: %{url}/archive/v%{version}.tar.gz |
11 | 10 |
|
| 11 | +BuildRequires: openssl-devel |
| 12 | +Requires: openssl |
| 13 | + |
| 14 | +Conflicts: python-shadowsocks python3-shadowsocks |
| 15 | + |
| 16 | +AutoReq: no |
12 | 17 |
|
13 | 18 | %description
|
14 |
| -Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes. |
| 19 | +shadowsocks-libev is a lightweight secured scoks5 proxy for embedded devices and low end boxes. |
| 20 | + |
15 | 21 |
|
16 | 22 | %prep
|
17 | 23 | %setup -q
|
18 | 24 |
|
19 | 25 |
|
20 | 26 | %build
|
21 |
| -%configure |
| 27 | +%configure --enable-shared |
22 | 28 | make %{?_smp_mflags}
|
23 | 29 |
|
24 | 30 |
|
25 | 31 | %install
|
26 |
| -rm -rf $RPM_BUILD_ROOT |
27 |
| -%make_install |
28 |
| -mkdir -p %{buildroot}/usr/lib/systemd/system |
29 |
| -cp %{SOURCE1} %{SOURCE2} %{buildroot}/usr/lib/systemd/system |
| 32 | +make install DESTDIR=%{buildroot} |
| 33 | +mkdir -p %{buildroot}/etc/shadowsocks-libev |
| 34 | +%if 0%{?rhel} == 6 |
| 35 | +mkdir -p %{buildroot}%{_initddir} |
| 36 | +install -m 755 %{_builddir}/%{buildsubdir}/rpm/SOURCES/etc/init.d/shadowsocks-libev %{buildroot}%{_initddir}/shadowsocks-libev |
| 37 | +%else |
| 38 | +mkdir -p %{buildroot}%{_sysconfdir}/default |
| 39 | +install -m 644 %{_builddir}/%{buildsubdir}/debian/shadowsocks-libev.default %{buildroot}%{_sysconfdir}/default/shadowsocks-libev |
| 40 | +install -m 644 %{_builddir}/%{buildsubdir}/debian/shadowsocks-libev.service %{buildroot}%{_unitdir}/shadowsocks-libev.service |
| 41 | +%endif |
| 42 | +install -m 644 %{_builddir}/%{buildsubdir}/debian/config.json %{buildroot}%{_sysconfdir}/shadowsocks-libev/config.json |
| 43 | + |
| 44 | +%if 0%{?rhel} == 6 |
| 45 | +%post |
| 46 | +/sbin/chkconfig --add shadowsocks-libev |
| 47 | +%preun |
| 48 | +if [ $1 -eq 0 ]; then |
| 49 | + /sbin/service shadowsocks-libev stop |
| 50 | + /sbin/chkconfig --del shadowsocks-libev |
| 51 | +fi |
| 52 | +%else |
| 53 | +Requires(post): systemd |
| 54 | +Requires(preun): systemd |
| 55 | +Requires(postun): systemd |
| 56 | +BuildRequires: systemd |
| 57 | +%post |
| 58 | +%systemd_post shadowsocks-libev.service |
| 59 | +%preun |
| 60 | +%systemd_preun shadowsocks-libev.service |
| 61 | +%postun |
| 62 | +%systemd_postun_with_restart shadowsocks-libev.service |
| 63 | +%endif |
30 | 64 |
|
31 | 65 |
|
32 | 66 | %files
|
33 |
| -%{_bindir}/ss-local |
34 |
| -%{_bindir}/ss-redir |
35 |
| -%{_bindir}/ss-server |
36 |
| -%{_bindir}/ss-tunnel |
| 67 | +%{_bindir}/* |
| 68 | +%{_libdir}/* |
| 69 | +%if 0%{?rhel} == 6 |
| 70 | +%{_initddir}/shadowsocks-libev |
| 71 | +%else |
| 72 | +%{_unitdir}/shadowsocks-libev.service |
| 73 | +%config(noreplace) %{_sysconfdir}/default/shadowsocks-libev |
| 74 | +%endif |
| 75 | +%config(noreplace) %{_sysconfdir}/shadowsocks-libev/config.json |
37 | 76 | %doc %{_mandir}/*
|
38 |
| -%doc /usr/lib/systemd/system/* |
39 |
| - |
40 | 77 |
|
41 | 78 | %package devel
|
42 |
| -Summary: Files for development of applications which will use shadowsocks. |
43 |
| -License: GPLv3+ |
44 |
| -URL: https://github.com/shadowsocks/shadowsocks-libev |
| 79 | +Summary: Development files for shadowsocks-libev |
| 80 | +License: GPLv3+ |
45 | 81 |
|
46 | 82 | %description devel
|
47 |
| -Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes. |
| 83 | +Development files for shadowsocks-libev |
48 | 84 |
|
49 | 85 | %files devel
|
50 |
| -%{_includedir}/shadowsocks.h |
51 |
| -%{_libdir}/libshadowsocks.a |
52 |
| -%{_libdir}/libshadowsocks.la |
53 |
| -%{_libdir}/pkgconfig/shadowsocks-libev.pc |
54 |
| - |
| 86 | +%{_includedir}/* |
55 | 87 |
|
56 | 88 | %changelog
|
| 89 | + |
0 commit comments