Skip to content

Commit

Permalink
Merge pull request #14 from ggtakec/master
Browse files Browse the repository at this point in the history
Updated files for release 1.0.66
  • Loading branch information
ggtakec authored Nov 30, 2018
2 parents 782a136 + 8e995d2 commit 0ec5f87
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
k2hash (1.0.66) trusty; urgency=low

* Fixed bug in debian package creation

-- Takeshi Nakatani <[email protected]> Fri, 30 Nov 2018 15:07:54 +0900

k2hash (1.0.65) trusty; urgency=low

* Changed to strict packaging and changed documents
Expand Down
23 changes: 20 additions & 3 deletions buildutils/debian_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ func_usage()
echo " -h print help"
echo ""
}

func_get_default_class()
{
dh_make -h 2>/dev/null | grep '\--multi' >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "multi"
else
echo "library"
fi
}

PRGNAME=`basename $0`
MYSCRIPTDIR=`dirname $0`
MYSCRIPTDIR=`cd ${MYSCRIPTDIR}; pwd`
Expand All @@ -54,7 +65,7 @@ IS_ROOTDIR=0
DH_MAKE_AUTORUN_OPTION=""
BUILD_NUMBER=1
DEBUILD_OPT=""
PKGCLASSNAME="library"
PKGCLASSNAME=`func_get_default_class`
while [ $# -ne 0 ]; do
if [ "X$1" = "X" ]; then
break
Expand Down Expand Up @@ -192,7 +203,7 @@ dh_make -f ${BUILDDEBDIR}/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz --createorig
#
# remove unnecessary template files
#
rm -rf ${EXPANDDIR}/debian/*.ex ${EXPANDDIR}/debian/*.EX ${EXPANDDIR}/debian/${PACKAGE_NAME}-doc.* ${EXPANDDIR}/debian/README.* ${EXPANDDIR}/debian/docs
rm -rf ${EXPANDDIR}/debian/*.ex ${EXPANDDIR}/debian/*.EX ${EXPANDDIR}/debian/${PACKAGE_NAME}-doc.* ${EXPANDDIR}/debian/README.* ${EXPANDDIR}/debian/docs ${EXPANDDIR}/debian/*.install

#
# adding some lines into rules file
Expand All @@ -214,7 +225,13 @@ echo " ls debian/${PACKAGE_NAME}/usr/lib/x86_64-linux-gnu/*.la >/dev/null 2>&1;
echo " ls debian/${PACKAGE_NAME}/usr/lib/x86_64-linux-gnu/*.so >/dev/null 2>&1; if [ $? -eq 0 ]; then rm -rf debian/${PACKAGE_NAME}/usr/lib/x86_64-linux-gnu/*.so; fi" >> ${EXPANDDIR}/debian/rules || exit 1
echo " ls debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.a >/dev/null 2>&1; if [ $? -eq 0 ]; then rm -rf debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.a; fi" >> ${EXPANDDIR}/debian/rules || exit 1
echo " ls debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.la >/dev/null 2>&1; if [ $? -eq 0 ]; then rm -rf debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.la; fi" >> ${EXPANDDIR}/debian/rules || exit 1
echo " ls debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.so* >/dev/null 2>&1; if [ $? -eq 0 ]; then rm -rf debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.so*; fi" >> ${EXPANDDIR}/debian/rules || exit 1
echo " ls debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.so.* >/dev/null 2>&1; if [ $? -eq 0 ]; then rm -rf debian/${PACKAGE_DEV_NAME}/usr/lib/x86_64-linux-gnu/*.so.*;fi" >> ${EXPANDDIR}/debian/rules || exit 1

if [ "X${CONFIGREOPT}" != "X" ]; then
echo "" >> ${EXPANDDIR}/debian/rules || exit 1
echo "override_dh_auto_configure:" >> ${EXPANDDIR}/debian/rules || exit 1
echo " dh_auto_configure -- ${CONFIGREOPT}" >> ${EXPANDDIR}/debian/rules || exit 1
fi

#
# create links file for library
Expand Down
6 changes: 6 additions & 0 deletions buildutils/make_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ elif [ ${PRGMODE} = "DEBHELPER" ]; then
fi

DEBHELPER_MAJOR_VER=`apt-cache show debhelper 2>/dev/null | grep Version 2>/dev/null | awk '{print $2}' 2>/dev/null | sed 's/\..*/ /g' 2>/dev/null`
expr "${DEBHELPER_MAJOR_VER}" + 1 >/dev/null 2>&1
if [ $? -ne 0 ]; then
DEBHELPER_MAJOR_VER=0
else
DEBHELPER_MAJOR_VER=`expr "${DEBHELPER_MAJOR_VER}" + 0`
fi
if [ ${DEBHELPER_MAJOR_VER} -lt 10 ]; then
RESULT="debhelper (>= 9), autotools-dev"
else
Expand Down

0 comments on commit 0ec5f87

Please sign in to comment.