Skip to content

Commit

Permalink
Revert "Create srpm and rpm targets to the Autotools build"
Browse files Browse the repository at this point in the history
This reverts commit 395515d.
  • Loading branch information
madeye committed May 8, 2018
1 parent a4f4043 commit 380cb81
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 29 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ build/
.deps/
/Makefile
src/Makefile
rpm/Makefile
libev/Makefile
libudns/Makefile
libcork/Makefile
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if USE_SYSTEM_SHARED_LIB
SUBDIRS = src rpm
SUBDIRS = src
else
SUBDIRS = libcork libipset libbloom src rpm
SUBDIRS = libcork libipset libbloom src
endif

if ENABLE_DOCUMENTATION
Expand Down
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS

AM_INIT_AUTOMAKE([subdir-objects foreign -Wno-gnu -Werror])
AM_EXTRA_RECURSIVE_TARGETS([rpm srpm])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
Expand Down Expand Up @@ -240,8 +239,7 @@ AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn
AC_CONFIG_FILES([shadowsocks-libev.pc
Makefile
doc/Makefile
src/Makefile
rpm/Makefile])
src/Makefile])

AM_COND_IF([USE_SYSTEM_SHARED_LIB],
[AC_DEFINE([USE_SYSTEM_SHARED_LIB], [1], [Define if use system shared lib.])],
Expand Down
8 changes: 0 additions & 8 deletions rpm/Makefile.am

This file was deleted.

17 changes: 2 additions & 15 deletions rpm/genrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ set -e
SELF=$(readlink -f -- "$0")
HERE=$(dirname -- "$SELF")

RPMBUILD=rpmbuild
RPMBUILD_OPTS=

show_help()
{
echo -e "`basename $0` [OPTION...]"
echo
echo -e "Options:"
echo -e " -h show this help."
echo -e " -s use system shared libraries"
echo -e " -S build SRPMs only"
}

OPT_USE_SYSTEM_LIB=0
OPT_SRPMS_ONLY=0

while getopts "hsS" opt
while getopts "hs" opt
do
case ${opt} in
h)
Expand All @@ -31,9 +26,6 @@ do
s)
OPT_USE_SYSTEM_LIB=1
;;
S)
OPT_SRPMS_ONLY=1
;;
*)
show_help
exit 1
Expand Down Expand Up @@ -90,11 +82,6 @@ sed -e "s/^\(Version:\).*$/\1 ${TARGET_VERSION}/" \
"${TARGET_SPEC_PATH}".in > "${TARGET_SPEC_PATH}"

# build rpms
if [ "$OPT_SRPMS_ONLY" -ne 0 ]; then
RPMBUILD_OPTS+=' -bs'
else
RPMBUILD_OPTS+=' -ba'
fi
"$RPMBUILD" $RPMBUILD_OPTS "$TARGET_SPEC_PATH" \
rpmbuild -ba "$TARGET_SPEC_PATH" \
--define "%_topdir $HERE" \
--define "%use_system_lib $OPT_USE_SYSTEM_LIB"

0 comments on commit 380cb81

Please sign in to comment.