]> git.ipfire.org Git - location/debian/libloc-database.git/commitdiff
add get-orig-source target for preparing orig tarball
authorHans-Christoph Steiner <hans@eds.org>
Wed, 26 Mar 2025 08:22:33 +0000 (09:22 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 26 Mar 2025 08:22:33 +0000 (09:22 +0100)
debian/rules
debian/watch

index 2d33f6ac8992b7da84b39a5bca0742c4962d3349..2fb8453501e7bfc1d8acfdc64a9c09de3597f84a 100755 (executable)
@@ -2,3 +2,17 @@
 
 %:
        dh $@
+
+get-orig-source:
+       $(eval upstream_version := $(shell uscan --download | sed -En 's,.*location-([0-9_:-]+)\.db.*,\1,p'))
+       $(eval orig_version := $(shell echo 0~$(upstream_version) | sed -E -e 's,-,,g' -e 's,([0-9][0-9]):,~\1,'))
+       echo upstream $(upstream_version) orig $(orig_version)
+       unxz ../location-$(upstream_version).db.xz
+       mkdir ../libloc-database-$(orig_version)
+       mv ../location-$(upstream_version).db ../libloc-database-$(orig_version)/location.db
+       $(eval orig_tarball := ../libloc-database_$(orig_version).orig.tar.xz)
+       tar --xz -cf $(orig_tarball) ../libloc-database-$(orig_version)
+       rm ../libloc-database-$(orig_version)/location.db
+       rmdir ../libloc-database-$(orig_version)
+       @echo "\nNow run:"
+       @echo "\tgbp import-orig --pristine-tar --sign-tags $(orig_tarball)"
index ed7967d0aa20918513f4f04cfb628104591b9899..d171212002889bbd95554dcff4a34197805b9a2e 100644 (file)
@@ -1,11 +1,6 @@
 # Automatically importing the new version does not work because mk-origtargz
 # can't handle a single xz compressed file. Use these commands to integrate a new version:
-# uscan
-# unxz ../location-2025-03-17-03:45.db.xz
-# mkdir ../libloc-database-0~20250317~0345
-# mv ../location-2025-03-17-03:45.db ../libloc-database-0~20250317~0345/location.db
-# tar cJf ../libloc-database_0~20250317~0345.orig.tar.xz ../libloc-database-0~20250317~0345
-# rm -r ../libloc-database-0~20250317~0345
+# make -f debian/rules get-orig-source
 # gbp import-orig ../libloc-database_0~20250317~0345.orig.tar.xz
 version=4
 opts="versionmangle=s/-(\d+):(\d+)/~$1$2/;s/(\d+)-(\d+)-(\d+)/0~$1$2$3/" \