Browse Source

Merge pull request #454 from huiyiqun/master

Update genrpm.sh
pull/455/head
Max Lv 9 years ago
parent
commit
3c2ec0e519
2 changed files with 7 additions and 7 deletions
  1. 2
      rpm/SPECS/shadowsocks-libev.spec
  2. 12
      rpm/genrpm.sh

2
rpm/SPECS/shadowsocks-libev.spec

@ -1,5 +1,5 @@
Name: shadowsocks-libev
Version: 2.4.0
Version: 2.4.1
Release: 1%{?dist}
Summary: A lightweight and secure socks5 proxy

12
rpm/genrpm.sh

@ -7,12 +7,12 @@ show_help()
echo
echo -e "Options:"
echo -e " -h show this help."
echo -e " -v with argument version (2.4.0 by default)."
echo -e " -v with argument version (2.4.1 by default)."
echo -e " -f with argument format (tar.xz by default) used by git archive."
echo
echo -e "Examples:"
echo -e " to build base on version \`2.4.0' with format \`tar.xz', run:"
echo -e " `basename $0` -f tar.xz -v 2.4.0"
echo -e " to build base on version \`2.4.1' with format \`tar.xz', run:"
echo -e " `basename $0` -f tar.xz -v 2.4.1"
}
while getopts "hv:f:" opt
@ -48,7 +48,7 @@ get_att_val()
fi
}
get_att_val version "2.4.0"
get_att_val version "2.4.1"
get_att_val format "tar.xz"
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: %{name}-%{version}\.\).*$/\1${format}/" \
sed -i -e "s/^\(Version: \).*$/\1${version}/" \
-e "s/^\(Source0: \).*$/\1${name}-${version}.${format}/" \
SPECS/${spec_name}
rpmbuild -bb SPECS/${spec_name} --define "%_topdir `pwd`"
Loading…
Cancel
Save