From: Jochen Sprickerhof Date: Wed, 6 Jul 2022 16:25:43 +0000 (+0200) Subject: Remove old files in debian/ X-Git-Tag: debian/0.9.13-1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=281f13871e86ad0de27c7ee5ff7cfa631f5a4ed6;p=location%2Fdebian%2Flibloc.git Remove old files in debian/ --- diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 8190b92..0000000 --- a/debian/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/.debhelper -/autoreconf.* -/debhelper-build-stamp -/files -/*/ -*.debhelper -*.log -*.substvars -!/patches/ -!/source/ -!/tests/ diff --git a/debian/build.sh b/debian/build.sh deleted file mode 100644 index a11f3a3..0000000 --- a/debian/build.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -ARCHITECTURES=( amd64 arm64 i386 armhf ) -RELEASES=( buster bullseye bookworm sid ) - -CHROOT_PATH="/var/tmp" - -main() { - if [ $# -lt 2 ]; then - echo "Not enough arguments" >&2 - return 2 - fi - - # Get host architecture - local host_arch="$(dpkg --print-architecture)" - if [ -z "${host_arch}" ]; then - echo "Could not discover host architecture" >&2 - return 1 - fi - - local package="${1}" - local sources="${2}" - - # Create some temporary directory - local tmp="$(mktemp -d)" - - # Extract the sources into it - mkdir -p "${tmp}/sources" - tar xvfa "${sources}" -C "${tmp}/sources" - - # Copy the tarball under the correct Debian name - cp -vf "${sources}" "${tmp}/sources/${package//-/_}.orig.tar.xz" - - # Change into temporary directory - pushd "${tmp}" - - # Build the package for each release - local release - for release in ${RELEASES[@]}; do - local chroot="${release}-${host_arch}-sbuild" - - mkdir -p "${release}" - pushd "${release}" - - # Create a chroot environment - if [ ! -d "/etc/sbuild/chroot/${chroot}" ]; then - if ! sbuild-createchroot --arch="${host_arch}" "${release}" \ - "${CHROOT_PATH}/${chroot}"; then - echo "Could not create chroot for ${release} on ${host_arch}" >&2 - rm -rf "${tmp}" - return 1 - fi - fi - - # And for each architecture we want to support - local arch - for arch in ${ARCHITECTURES[@]}; do - mkdir -p "${arch}" - pushd "${arch}" - - # Copy sources - cp -r "${tmp}/sources" . - - # Run the build process - if ! sbuild --dist="${release}" --host="${arch}" --source "sources/${package}"; then - echo "Could not build package for ${release} on ${arch}" >&2 - rm -rf "${tmp}" - return 1 - fi - - # Remove the sources - rm -rf "sources/${package}" - popd - done - popd - done - - # Remove sources - rm -rf "${tmp}/sources" - popd - - # Done! - echo "SUCCESS!" - echo " You can find your Debian packages in ${tmp}" - return 0 -} - -main "$@" || exit $? diff --git a/debian/genchangelog.sh b/debian/genchangelog.sh deleted file mode 100755 index ab1c198..0000000 --- a/debian/genchangelog.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -e -gitshow () { - local format=$1 - local commit=$2 - - git show --no-patch --format=format:"$format" "$commit" -} - -main () { - if [ $# -lt 1 ]; then - local bn="$(basename $0)" - echo "Usage: $bn " >&2 - echo "Example: $bn 0.9.7..HEAD" >&2 - echo "Example: $bn 0.9.5..0.9.6^" >&2 - return 1 - fi - - local commitrange=$1 - - local commit - for commit in $(git rev-list --reverse "$commitrange"); do - # Skip commits with diffs that only have Makefile.am or d/ changes. - if [ "$(git diff --name-only "${commit}^..${commit}" -- . ':^Makefile.am' ':^debian/' | wc -l)" == 0 ]; then - continue - fi - - local author_name="$(gitshow %an "$commit")" - local author_email="$(gitshow %ae "$commit")" - local subject="$(gitshow %s "$commit")" - - echo "$author_name <$author_email> $subject" - DEBFULLNAME="$author_name" DEBEMAIL="$author_email" debchange --upstream --multimaint-merge "$subject" - done - - debchange --release '' -} - -main "$@" || exit $? diff --git a/debian/gensymbols.sh b/debian/gensymbols.sh deleted file mode 100755 index 8523556..0000000 --- a/debian/gensymbols.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -SYMBOLS_PKG=libloc1 -LOCAL_FILE=debian/libloc1.symbols -TEMP_FILE="$(mktemp --tmpdir libloc1.XXXXXX.symbols)" -trap "rm -f ${TEMP_FILE}" EXIT - -generate () { - intltoolize --force --automake - autoreconf --install --symlink - ./configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib - - make - - dpkg-gensymbols -p"$SYMBOLS_PKG" -O"$TEMP_FILE" -esrc/.libs/libloc.so.* - sed -i -E -e 's/( [0-9\.]+)-.+$/\1/' "$TEMP_FILE" - - make clean -} - -main () { - local maxver='0.0.0' - if [ -f "$LOCAL_FILE" ]; then - cp "$LOCAL_FILE" "$TEMP_FILE" - maxver="$(grep -E '^ ' "$LOCAL_FILE" | cut -d' ' -f3 | sort -Vru | head -n1)" - echo "Latest version checked: $maxver" - fi - - - local tag - for tag in $(git tag -l --sort=version:refname) - do - if [ "$(echo -e "${maxver}\n${tag}" | sort -Vr | head -n1)" == "$maxver" ]; then - echo "Tag $tag -- skip" - continue - fi - - echo "Tag $tag -- checking" - git switch --quiet --detach "$tag" || return 1 - generate || return 1 - git switch --quiet - || return 1 - done - - echo "Current -- checking" - generate || return 1 - - mv "$TEMP_FILE" "$LOCAL_FILE" - chmod 644 "$LOCAL_FILE" -} - -main "$@" || exit $? diff --git a/debian/location-perl.install b/debian/location-perl.install deleted file mode 100644 index 08e8cc4..0000000 --- a/debian/location-perl.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/perl/