Browse Source

Fix #887

pull/892/head
Max Lv 8 years ago
parent
commit
91b4e6ad6d
2 changed files with 15 additions and 7 deletions
  1. 12
      rpm/SPECS/shadowsocks-libev.spec.in
  2. 10
      rpm/genrpm.sh

rpm/SPECS/shadowsocks-libev.spec → rpm/SPECS/shadowsocks-libev.spec.in

@ -1,11 +1,11 @@
Name: shadowsocks-libev
Version: 2.4.1
Version: VERSION
Release: 1%{?dist}
Summary: A lightweight and secure socks5 proxy
Group: Applications/Internet
License: GPLv3+
URL: https://github.com/madeye/%{name}
URL: https://github.com/shadowsocks/%{name}
Source0: %{url}/archive/v%{version}.tar.gz
BuildRequires: openssl-devel
@ -75,6 +75,13 @@ fi
%files
/usr/share/doc/shadowsocks-libev/shadowsocks-libev.html
/usr/share/doc/shadowsocks-libev/ss-local.html
/usr/share/doc/shadowsocks-libev/ss-manager.html
/usr/share/doc/shadowsocks-libev/ss-nat.html
/usr/share/doc/shadowsocks-libev/ss-redir.html
/usr/share/doc/shadowsocks-libev/ss-server.html
/usr/share/doc/shadowsocks-libev/ss-tunnel.html
%{_bindir}/*
%{_libdir}/*
%config(noreplace) %{_sysconfdir}/shadowsocks-libev/config.json
@ -89,6 +96,7 @@ fi
%package devel
Summary: Development files for shadowsocks-libev
Group: Applications/Internet
License: GPLv3+
%description devel

10
rpm/genrpm.sh

@ -7,7 +7,7 @@ show_help()
echo
echo -e "Options:"
echo -e " -h show this help."
echo -e " -v with argument version (2.4.1 by default)."
echo -e " -v with argument version (2.5.5 by default)."
echo -e " -f with argument format (tar.xz by default) used by git archive."
echo
echo -e "Examples:"
@ -48,7 +48,7 @@ get_att_val()
fi
}
get_att_val version "2.4.5"
get_att_val version "2.5.5"
get_att_val format "tar.gz"
name="shadowsocks-libev"
@ -58,8 +58,8 @@ pushd `git rev-parse --show-toplevel`
git archive v${version} --format=${format} --prefix=${name}-${version}/ -o rpm/SOURCES/${name}-${version}.${format}
pushd rpm
sed -i -e "s/^\(Version: \).*$/\1${version}/" \
-e "s/^\(Source0: \).*$/\1${name}-${version}.${format}/" \
SPECS/${spec_name}
sed -e "s/^\(Version: \).*$/\1${version}/" \
-e "s/^\(Source0: \).*$/\1${name}-${version}.${format}/" \
SPECS/${spec_name}.in > SPECS/${spec_name}
rpmbuild -bb SPECS/${spec_name} --define "%_topdir `pwd`"
Loading…
Cancel
Save