Auto merge of #1661 - ageis:deb-pkg-enhancements, r=arcalinea
Debian packaging fixes * Updates maintainer scripts from latest version of `dh_make` * Includes `rules` file * Use `fakeroot` to build the package. We use currently `dpkg-deb --build` instead of `debuild` or `dpkg-buildpackage`, so I don't know if the package is well-formatted for the latter. (one difference, the former works with uppercase `DEBIAN`, the latter lowercase `debian` -- that's why the directory was renamed)
This commit is contained in:
commit
ab5c175744
|
@ -7,13 +7,13 @@ Build-Depends: autoconf, automake, bsdmainutils, build-essential
|
|||
git, g++-multilib, libc6-dev, libtool
|
||||
m4, ncurses-dev, pkg-config, python
|
||||
unzip, wget, zlib1g-dev
|
||||
Vcs-Git: git@github.com:zcash/zcash.git
|
||||
Vcs-Git: https://github.com/zcash/zcash.git
|
||||
Vcs-Browser: https://github.com/zcash/zcash
|
||||
Package: zcash
|
||||
Version: 1.0.0-rc4
|
||||
Architecture: amd64
|
||||
Depends: libgomp1
|
||||
Description: Zcash is an implementation of the "Zerocash" protocol.
|
||||
Description: An implementation of the "Zerocash" protocol.
|
||||
Based on Bitcoin's code, it intends to offer a far higher standard
|
||||
of privacy and anonymity through a sophisticiated zero-knowledge
|
||||
proving scheme which preserves confidentiality of transaction metadata.
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
# postinst script for zcash
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
|
@ -13,9 +14,10 @@ set -x
|
|||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
|
@ -15,18 +15,12 @@ set -e
|
|||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
|
||||
case "$1" in
|
||||
upgrade|failed-upgrade)
|
||||
;;
|
||||
|
||||
remove|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
purge)
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
|
@ -4,20 +4,18 @@
|
|||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
;;
|
||||
|
||||
upgrade)
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
|
|
|
@ -13,15 +13,12 @@ set -e
|
|||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
remove|deconfigure)
|
||||
;;
|
||||
|
||||
upgrade)
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
|
||||
%:
|
||||
dh $@ --with autotools_dev
|
||||
|
||||
|
||||
# dh_make generated override targets
|
||||
# This is example for Cmake (See https://bugs.debian.org/641051 )
|
||||
#override_dh_auto_configure:
|
||||
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
|
||||
|
|
@ -0,0 +1 @@
|
|||
DEBIAN/examples/zcash.conf
|
|
@ -0,0 +1,2 @@
|
|||
DEBIAN/manpages/zcash-cli.1
|
||||
DEBIAN/manpages/zcashd.1
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
## Usage:
|
||||
## ./build_DEBIAN_package.sh
|
||||
## ./zcutil/build-debian-package.sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
@ -8,6 +8,7 @@ set -x
|
|||
BUILD_PATH="/tmp/zcbuild"
|
||||
PACKAGE_NAME="zcash"
|
||||
SRC_PATH=`pwd`
|
||||
SRC_DEB=$SRC_PATH/contrib/DEBIAN
|
||||
|
||||
umask 022
|
||||
|
||||
|
@ -21,15 +22,42 @@ BUILD_DIR="$BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64"
|
|||
if [ -d $BUILD_DIR ]; then
|
||||
rm -R $BUILD_DIR
|
||||
fi
|
||||
mkdir -p $BUILD_DIR/DEBIAN $BUILD_DIR/usr/bin
|
||||
|
||||
cp -r $SRC_PATH/contrib/DEBIAN/* $BUILD_DIR/DEBIAN/
|
||||
cp $SRC_PATH/src/zcashd $BUILD_DIR/usr/bin/
|
||||
cp $SRC_PATH/src/zcash-cli $BUILD_DIR/usr/bin/
|
||||
cp $SRC_PATH/zcutil/fetch-params.sh $BUILD_DIR/usr/bin/zcash-fetch-params
|
||||
DEB_BIN=$BUILD_DIR/usr/bin
|
||||
DEB_DOC=$BUILD_DIR/usr/share/doc/$PACKAGE_NAME
|
||||
DEB_MAN=$BUILD_DIR/usr/share/man/man1
|
||||
mkdir -p $BUILD_DIR/DEBIAN $DEB_BIN $DEB_DOC $DEB_MAN
|
||||
chmod 0755 -R $BUILD_DIR/*
|
||||
|
||||
# Create the deb package
|
||||
dpkg-deb --build $BUILD_DIR
|
||||
# Copy control file
|
||||
cp $SRC_DEB/control $BUILD_DIR/DEBIAN
|
||||
# Package maintainer scripts (currently empty)
|
||||
#cp $SRC_DEB/postinst $BUILD_DIR/DEBIAN
|
||||
#cp $SRC_DEB/postrm $BUILD_DIR/DEBIAN
|
||||
#cp $SRC_DEB/preinst $BUILD_DIR/DEBIAN
|
||||
#cp $SRC_DEB/prerm $BUILD_DIR/DEBIAN
|
||||
cp $SRC_DEB/rules $BUILD_DIR/DEBIAN
|
||||
# Copy binaries
|
||||
cp $SRC_PATH/src/zcashd $DEB_BIN
|
||||
cp $SRC_PATH/src/zcash-cli $DEB_BIN
|
||||
cp $SRC_PATH/zcutil/fetch-params.sh $DEB_BIN/zcash-fetch-params
|
||||
# Copy docs
|
||||
cp $SRC_PATH/doc/release-notes/release-notes-$PACKAGE_VERSION.md $DEB_DOC/changelog
|
||||
cp $SRC_DEB/changelog $DEB_DOC/changelog.Debian
|
||||
cp $SRC_DEB/copyright $DEB_DOC
|
||||
cp -r $SRC_DEB/examples $DEB_DOC
|
||||
# Copy manpages
|
||||
cp $SRC_DEB/manpages/zcashd.1 $DEB_MAN
|
||||
cp $SRC_DEB/manpages/zcash-cli.1 $DEB_MAN
|
||||
# Gzip files
|
||||
gzip --best -n $DEB_DOC/changelog
|
||||
gzip --best -n $DEB_DOC/changelog.Debian
|
||||
gzip --best -n $DEB_MAN/zcashd.1
|
||||
gzip --best -n $DEB_MAN/zcash-cli.1
|
||||
|
||||
# Create the Debian package
|
||||
fakeroot dpkg-deb --build $BUILD_DIR
|
||||
cp $BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64.deb $SRC_PATH
|
||||
|
||||
# Analyze with Lintian, reporting bugs and policy violations
|
||||
lintian -i $SRC_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64.deb
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue