Control: tags -1 + patch

Hi everyone,

I added some filenamemangle options so that the core and masterfiles
tarball get named correctly after download.

Best wishes,
-- 
Moritz Schlarb
Unix-Gruppe | Systembetreuung
Zentrum für Datenverarbeitung
Johannes Gutenberg-Universität Mainz
Raum 01-331 - Tel. +49 6131 39-29441
OpenPGP Fingerprint: DF01 2247 BFC6
5501 AFF2 8445 0C24 B841 C7DD BAAF
diff --git a/debian/watch b/debian/watch
index 714580b..298f059 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,13 @@
 version=4
-https://cfengine.com/product/community/ .*/cfengine-(\d.*).tar.gz
-opts="component=masterfiles" https://cfengine.com/product/community/ .*/cfengine-masterfiles-(\d.*).tar.gz
+# Since the official upstream download page at https://cfengine.com/product/community/
+# is dynamically generated from many layers of JSON files, we instead look at the
+# GitHub releases page to get a list of versions and then construct the URLs for
+# release tarballs from them.
+# Therefore, the following looks pretty ugly. If someone finds a sane way to improve it,
+# please do so!
+opts=downloadurlmangle=s%https://github.com/cfengine/core/archive/(@ANY_VERSION@@ARCHIVE_EXT@)%https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-$1%,\
+		filenamemangle=s%.*/(@ANY_VERSION@)(@ARCHIVE_EXT@)%cfengine-$1$3% \
+	https://github.com/cfengine/core/releases .*/([\.\d]+)@ARCHIVE_EXT@
+opts=component=masterfiles,downloadurlmangle=s%https://github.com/cfengine/masterfiles/archive/(@ANY_VERSION@@ARCHIVE_EXT@)%https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-$1%,\
+		filenamemangle=s%.*/(@ANY_VERSION@)(@ARCHIVE_EXT@)%cfengine-masterfiles-$1$3% \
+	https://github.com/cfengine/masterfiles/releases .*/([\.\d]+)@ARCHIVE_EXT@

<<attachment: schlarbm.vcf>>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to