simplify debian/rules a bit

This commit is contained in:
Daniel Pavel 2013-06-16 14:06:22 +02:00
parent a44d9b7ca8
commit 687e1be3e5
3 changed files with 7 additions and 7 deletions

View File

@ -8,6 +8,7 @@ DEVSCRIPTS="${HOME}/.devscripts"
DISTRIBUTION=${DISTRIBUTION:-debian}
cd "$(dirname "$0")/.."
UDEV_RULES="$PWD/rules.d"
DEBIAN_FILES="$PWD/packaging/debian"
DIST="$PWD/dist/$DISTRIBUTION"
export DIST_RELEASE=${DIST_RELEASE:-UNRELEASED}
@ -52,6 +53,7 @@ mv "$S" solaar_$VERSION.orig.tar.gz
cd solaar-$VERSION
cp -a "$DEBIAN_FILES" .
test -s debian/solaar.udev || cp -a "$UDEV_RULES"/??-*.rules debian/solaar.udev
cat >debian/changelog <<_CHANGELOG
solaar ($VERSION-$BUILD_NUMBER$BUILD_EXTRA) $DIST_RELEASE; urgency=low
@ -60,9 +62,10 @@ solaar ($VERSION-$BUILD_NUMBER$BUILD_EXTRA) $DIST_RELEASE; urgency=low
-- $DEBFULLNAME <$DEBMAIL> $(date -R)
_CHANGELOG
test -z "$BUILD_EXTRA" && cp debian/changelog "$DEBIAN_FILES"/changelog
# if this is the main (Debian) build, update the changelog
test "$BUILD_EXTRA" || cp -a debian/changelog "$DEBIAN_FILES"/changelog
test -n "$DEBIAN_FILES_EXTRA" && cp -a $DEBIAN_FILES_EXTRA/* debian/
test "$DEBIAN_FILES_EXTRA" && cp -a $DEBIAN_FILES_EXTRA/* debian/
/usr/bin/debuild ${DEBUILD_ARGS:-$@} \
--lintian-opts --profile $DISTRIBUTION

View File

@ -18,9 +18,5 @@ override_dh_auto_install:
override_dh_python2:
dh_python2 $(PREFIX)/share/solaar
override_dh_installudev:
cp rules.d/??-logitech-unifying-receiver.rules debian/solaar.logitech-unifying-receiver.udev
dh_installudev --priority=99 --name=logitech-unifying-receiver
override_dh_gencontrol:
dh_gencontrol -- -Tdebian/substvars.extra

View File

@ -4,7 +4,8 @@ PREFIX = /opt/extras.ubuntu.com/solaar
# hacky...
override_dh_link:
dh_link
dh_link "$@"
# replace the Exec and Icon targets with the proper full paths
sed -i -e 's#Exec=solaar#Exec=/opt/extras.ubuntu.com/solaar/bin/solaar#' \
debian/solaar/opt/extras.ubuntu.com/solaar/share/applications/solaar.desktop
sed -i -e 's#Icon=solaar#Icon=/opt/extras.ubuntu.com/solaar/share/pixmaps/solaar.png#' \