summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-08-13 16:15:18 +0200
committerChristian Pointner <equinox@spreadspace.org>2017-08-13 16:15:18 +0200
commit6ee370ee359940f86e17a91934dbe0280114eca7 (patch)
tree63051938ff551965582b932e2da0f07026b0fb7f
parentupgraded to 0.1.3 (diff)
new v0.1 based package
-rw-r--r--debian/changelog7
-rw-r--r--debian/control2
-rw-r--r--debian/copyright2
-rw-r--r--debian/example.conf3
-rw-r--r--debian/patches/allow-dashes-in-repository-names.patch13
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules21
-rw-r--r--debian/vanity.conf3
-rw-r--r--debian/vanity.dirs1
-rw-r--r--debian/vanity.examples1
-rw-r--r--debian/vanity.install2
-rw-r--r--debian/vanity@.service (renamed from debian/vanity.service)5
12 files changed, 23 insertions, 38 deletions
diff --git a/debian/changelog b/debian/changelog
index bd91542..526a0b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+vanity (0.1.3-1) unstable; urgency=medium
+
+ * new upstream release
+ * systemd unit is now a template
+
+ -- Christian Pointner <equinox@spreadspace.org> Sun, 13 Aug 2017 16:11:11 +0200
+
vanity (0.1.1-5) unstable; urgency=medium
* fixed default config
diff --git a/debian/control b/debian/control
index a7a9ddf..3bf0d2c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Maintainer: Christian Pointner <equinox@spreadspace.org>
Section: utils
Priority: optional
Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 9), dh-systemd, golang-go (>=2:1.5)
+Build-Depends: debhelper (>= 9), golang-go (>=2:1.5), dh-golang
Package: vanity
Architecture: any
diff --git a/debian/copyright b/debian/copyright
index c9aca29..4d3bef3 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -35,7 +35,7 @@ License: BSD-2-clause
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: debian/*
-Copyright: 2016, Christian Pointner <equinox@spreadspace.org>
+Copyright: 2016-2017, Christian Pointner <equinox@spreadspace.org>
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/debian/example.conf b/debian/example.conf
new file mode 100644
index 0000000..bf9ab8e
--- /dev/null
+++ b/debian/example.conf
@@ -0,0 +1,3 @@
+VANITY_ADDR=127.0.0.1:9192
+VANITY_ROOT=https://example.com
+VANITY_REPO_ROOT=https://git.example.com
diff --git a/debian/patches/allow-dashes-in-repository-names.patch b/debian/patches/allow-dashes-in-repository-names.patch
deleted file mode 100644
index 9fe5994..0000000
--- a/debian/patches/allow-dashes-in-repository-names.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-This allows '-' for package names
-see: https://github.com/xiam/vanity/pull/6
---- a/main.go
-+++ b/main.go
-@@ -24,7 +24,7 @@
- repoRootFlag = flag.String("repo-root", "", "Git repository root URL (e.g.: https://github.com/upper).")
- )
-
--var packagePattern = regexp.MustCompile(`^/([a-zA-Z0-9]+)\.?(v[1-9][0-9]*)?(.*)$`)
-+var packagePattern = regexp.MustCompile(`^/([-a-zA-Z0-9]+)\.?(v[1-9][0-9]*)?(.*)$`)
-
- var httpClient = &http.Client{Timeout: 10 * time.Second}
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index f599fcd..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-allow-dashes-in-repository-names.patch
diff --git a/debian/rules b/debian/rules
index 9ab11b4..939a182 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,11 @@
#!/usr/bin/make -f
-%:
- dh $@ --with=systemd
-
-override_dh_clean:
- dh_clean
- rm -f vanity
-override_dh_auto_configure:
+export DH_OPTIONS
+export DH_GOPKG := github.com/xiam/vanity
-override_dh_auto_build:
- go build -o vanity
-
-override_dh_auto_install:
- install -d $$(pwd)/debian/tmp/usr/bin/
- install -m 755 $$(pwd)/vanity $$(pwd)/debian/tmp/usr/bin/vanity
- install -d $$(pwd)/debian/tmp/etc/
- install -m 644 $$(pwd)/debian/vanity.conf $$(pwd)/debian/tmp/etc/
+%:
+ dh $@ --buildsystem=golang --with=golang
override_dh_installinit:
+ install -d $$(pwd)/debian/vanity/lib/systemd/system/
+ install -m 644 $$(pwd)/debian/vanity@.service $$(pwd)/debian/vanity/lib/systemd/system/
diff --git a/debian/vanity.conf b/debian/vanity.conf
deleted file mode 100644
index ae10701..0000000
--- a/debian/vanity.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-VANITY_ADDR=127.0.0.1:9192
-VANITY_ROOT=https://spreadspace.org
-VANITY_REPO_ROOT=https://git.spreadspace.org
diff --git a/debian/vanity.dirs b/debian/vanity.dirs
new file mode 100644
index 0000000..e0be8a2
--- /dev/null
+++ b/debian/vanity.dirs
@@ -0,0 +1 @@
+/etc/vanity/
diff --git a/debian/vanity.examples b/debian/vanity.examples
new file mode 100644
index 0000000..66299e9
--- /dev/null
+++ b/debian/vanity.examples
@@ -0,0 +1 @@
+debian/example.conf
diff --git a/debian/vanity.install b/debian/vanity.install
deleted file mode 100644
index b90e2b1..0000000
--- a/debian/vanity.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin/vanity
-etc/vanity.conf
diff --git a/debian/vanity.service b/debian/vanity@.service
index 39eb0c9..cb6e2a2 100644
--- a/debian/vanity.service
+++ b/debian/vanity@.service
@@ -1,8 +1,9 @@
[Unit]
-Description=make go packages gettable
+Description=make go packages gettable (%I)
+After=network.target
[Service]
-EnvironmentFile=/etc/vanity.conf
+EnvironmentFile=/etc/vanity/%i.conf
ExecStart=/usr/bin/vanity -addr=${VANITY_ADDR} -vanity-root=${VANITY_ROOT} -repo-root=${VANITY_REPO_ROOT}
User=vanity
Group=vanity