debian/: Packaging updates

parent de760a29
#!/bin/bash
# I use this script to build and publish deb packages in ppa:mikhailnov/pulseeffects (https://launchpad.net/~mikhailnov/+archive/ubuntu/pulseeffects)
# I publish it to allow other people to use it and make it possible to maintain a new PPA easily in case I stop doing it for some reason
# I think, it can also be used for maintaining packages in mainline Debian (minor modifications required)
pkg_name="pulseeffects"
# this allows the script to be ran both from the root of the source tree and from ./debian directory
dir_start="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "$(basename "${dir_start}")" = 'debian' ]; then
cd ..
fi
debian/rules clean
dir0="$(pwd)"
old_header=$(head -1 ./debian/changelog)
old_format_source=$(cat ./debian/source/format)
tmp_suffix="buildPPA_$(date +%s)_tmp"
for i in bionic cosmic disco
do
old_version="$(cat ./debian/changelog | head -n 1 | awk -F "(" '{print $2}' | awk -F ")" '{print $1}')"
new_version="${old_version}~${i}1"
real_version="$(echo "$old_version" | cut -d'-' -f1)"
sed -i -re "s/${old_version}/${new_version}/g" ./debian/changelog
sed -i -re "1s/unstable/$i/" ./debian/changelog
if grep -q '(git)' ./debian/source/format; then
GIT=1
old_source_format="$(cat ./debian/source/format)"
# TODO: Launchpad PPA does not accept in '3.0 (git)' for some reasons
rm -fv ./debian/source/format
git add .
# dpkg-buildpackage also tries to diff current git vs tarball if it finds it in ../
while read line
do
# TODO: check if target file already exists
mv -v "$line" "${line}.${tmp_suffix}"
done < <(find ../ -maxdepth 1 -name "${pkg_name}_${real_version}.orig.tar*")
fi
# -I to exclude .git; -d to allow building .changes file without build dependencies installed
dpkg-buildpackage -I -S -sa -d
sed -i -re "1s/.*/${old_header}/" ./debian/changelog
[ "$GIT" = 1 ] && git reset
[ -n "$old_source_format" ] && echo "$old_source_format" > ./debian/source/format
# dpkg-buildpackage also tries to diff current git vs tarball if it finds it in ../
while read line
do
new_name="$(echo "$line" | sed -e "s/.${tmp_suffix}$//g")"
# TODO: check if target file already exists
mv -v "$line" "$new_name"
done < <(find ../ -maxdepth 1 -name "*.${tmp_suffix}")
cd ..
# change PPA names to yours, you may leave only one PPA; I upload hw-probe to 2 different PPAs at the same time
for ppa_name in ppa:mikhailnov/pulseeffects ppa:mikhailnov/utils ppa:mikhailnov/desktop1-dev
do
# example file name: pulseeffects_4.4.3-1~bionic1_source.changes
if [ -f "${pkg_name}_${new_version}_source.changes" ]
then dput -f "$ppa_name" "${pkg_name}_${new_version}_source.changes"
else echo ".changes file ${pkg_name}_${new_version}_source.changes not found, not uploading anything!"
fi
done
cd "$dir0"
sleep 1
done
debian/rules clean
cd "$dir_start"
This diff is collapsed.
pulseeffects (%new_version%-1) unstable; urgency=low
* Version %new_version% upstream (autobuild)
-- Mikhail Novosyolov <mikhailnov@dumalogiya.ru> %day_name%, %day_month% %month_name% %year% %time% %timezone%
Source: pulseeffects Source: pulseeffects
Section: sound Section: sound
Priority: optional Priority: optional
Maintainer: Mikhail Novosyolov <mikhailnov@dumalogiya.ru> Maintainer: Boyuan Yang <byang@debian.org>
Standards-Version: 4.1.4 Standards-Version: 4.3.0
Homepage: https://github.com/wwmm/pulseeffects
Build-Depends: Build-Depends:
appstream-util, appstream-util,
debhelper (>=11), debhelper-compat (= 12),
desktop-file-utils, desktop-file-utils,
itstool, itstool,
libboost-filesystem-dev (>= 1.65) | libboost-filesystem1.70-dev (>= 1.65) | libboost-filesystem1.69-dev (>= 1.65) | libboost-filesystem1.68-dev (>= 1.65) | libboost-filesystem1.67-dev (>= 1.65) | libboost-filesystem1.66-dev (>= 1.65) | libboost-filesystem1.65-dev (>= 1.65), libboost-filesystem-dev (>= 1.65),
libboost-system-dev (>= 1.65) | libboost-system1.70-dev (>= 1.65) | libboost-system1.69-dev (>= 1.65) | libboost-system1.68-dev (>= 1.65) | libboost-system1.67-dev (>= 1.65) | libboost-system1.66-dev (>= 1.65) | libboost-system1.65-dev (>= 1.65), libboost-system-dev (>= 1.65),
libbs2b-dev, libbs2b-dev,
libebur128-dev, libebur128-dev,
libglibmm-2.4-dev, libglibmm-2.4-dev,
...@@ -28,6 +27,9 @@ Build-Depends: ...@@ -28,6 +27,9 @@ Build-Depends:
meson (>=0.40), meson (>=0.40),
pkg-config, pkg-config,
scour, scour,
Homepage: https://github.com/wwmm/pulseeffects
Vcs-Git: https://salsa.debian.org/debian/pulseeffects.git
Vcs-Browser: https://salsa.debian.org/debian/pulseeffects.git
Package: gstreamer1.0-adapter-pulseeffects Package: gstreamer1.0-adapter-pulseeffects
Architecture: any Architecture: any
......
#!/usr/bin/make -f #!/usr/bin/make -f
export DH_VERBOSE=255 # 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 scour
# Fail the build if some produced files # Fail the build if some produced files
# are not included in neither of multiple packages # are not included in neither of multiple packages
...@@ -8,6 +24,3 @@ override_dh_missing: ...@@ -8,6 +24,3 @@ override_dh_missing:
override_dh_auto_test: override_dh_auto_test:
echo "Auto-tests are disabled due to a very strange issue https://github.com/wwmm/pulseeffects/issues/304" echo "Auto-tests are disabled due to a very strange issue https://github.com/wwmm/pulseeffects/issues/304"
%:
dh $@ --with scour
version=4 version=4
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/<project>-$1\.tar\.gz/ \ opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/<project>-$1\.tar\.gz/ \
https://github.com/wwmm/pulseeffects/tags .*/v?(\d\S+)\.tar\.gz https://github.com/wwmm/pulseeffects/tags .*/v?(\d\S+)\.tar\.gz debian uupdate
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment