Skip to content

Commit

Permalink
Merge pull request xcat2#23 from neo954/build-scripts
Browse files Browse the repository at this point in the history
Redo debian packaging, mark files under directory /etc as conffiles
  • Loading branch information
chenglch authored Feb 8, 2018
2 parents f336859 + 3b6aa01 commit 9c528a1
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions dirty-debuild
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,37 @@ case "${ARCH}" in
;;
esac

cat <<-EOF >description-pak
Independent tool to provide terminal session service.
goconserver is written in golang and is a part of microservice of xcat3. It
can work as a independent tool to provide the terminal session service.
Terminal session could run in the background and help logging the terminal
content.
GOCONSERVER_PREP_TARBALL="goconserver.tar.gz"
EXTRACT_DIR="goconserver-${VERSION:-0.0.1}"
rm -rf "${EXTRACT_DIR}.orig" "${EXTRACT_DIR}"

ln -s -f "${GOCONSERVER_REPACK_TARBALL}" "${GOCONSERVER_PREP_TARBALL}"

alien -d -g -c -k --version=${VERSION:-0.0.1} "${GOCONSERVER_PREP_TARBALL}"
rm -f "${GOCONSERVER_PREP_TARBALL}"

sed -i -e 's/^Copyright: .*$/Copyright: EPL/' \
"${EXTRACT_DIR}/debian/copyright"
sed -i -e 's/^Architecture: .*$/Architecture: ppc64el/' \
-e 's/^Maintainer: .*$/Maintainer: GONG Jie <[email protected]>/' \
-e '/^Description:/,$d' \
"${EXTRACT_DIR}/debian/control"
cat <<-EOF >>"${EXTRACT_DIR}/debian/control"
Description: Independent tool to provide terminal session service.
goconserver is written in golang and is a part of microservice of xcat3. It
can work as a independent tool to provide the terminal session service.
Terminal session could run in the background and help logging the terminal
content.
EOF

# Make sure goconserver is not installed
dpkg -P goconserver
cat <<-EOF >"${EXTRACT_DIR}/debian/changelog"
goconserver (${VERSION:-0.0.1}-snap$(date '+%Y%m%d%H%M')) experimental; urgency=low
type checkinstall >/dev/null 2>&1
exit_if_bad "$?" "Command not found - checkinstall"
* Converted from .tgz format to .deb by alien version 8.95
checkinstall --arch "${ARCH}" -D -y \
--pkgname goconserver \
--pkglicense EPL \
--pkgversion ${VERSION:-0.0.1} \
--pkgrelease "snap$(date '+%Y%m%d%H%M')" \
--maintainer "[email protected]" \
--requires libc6 \
tar -x -C / -f "${GOCONSERVER_REPACK_TARBALL}"
exit_if_bad "$?" "build package failed."
rm -f description-pak
dpkg -P goconserver
-- GONG Jie <[email protected]> $(date -R)
EOF

( cd "${EXTRACT_DIR}" && debian/rules binary )

0 comments on commit 9c528a1

Please sign in to comment.