summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Kuntze2018-03-31 21:06:16 +0200
committerNoel Kuntze2018-03-31 21:06:16 +0200
commit3c8f3b6b72c6444cdc57eeaa1f00a9f386768651 (patch)
tree047101650636f0033298596f87173107919b262e
parent0f99a38ac11554148203d0274920ac832ad7417f (diff)
downloadaur-3c8f3b6b72c6444cdc57eeaa1f00a9f386768651.tar.gz
Use an install file to build the image when the package is installed and disable and stop the timer unit and remove the image when the package is removed.
-rw-r--r--PKGBUILD1
-rw-r--r--docker_makepkg.install9
2 files changed, 10 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c4edb6523700..a103ddcb77d3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,6 +13,7 @@ source=("https://github.com/Thermi/docker-makepkg/archive/${pkgver}.tar.gz"
sha256sums=('cf7a11768d217fbf16272c2777365240130f73f2cb1705429296a4dd40a14409'
'SKIP')
validpgpkeys=(92C65A2073E1D8A4D0985B7B509B7C4EBF451EDC)
+install=docker_makepkg.install
package() {
cd "$pkgdir"
diff --git a/docker_makepkg.install b/docker_makepkg.install
new file mode 100644
index 000000000000..0bc73a99eb23
--- /dev/null
+++ b/docker_makepkg.install
@@ -0,0 +1,9 @@
+post_install() {
+ systemctl start docker-makepkg
+}
+
+post_remove() {
+ systemctl disable docker-makepkg.timer
+ systemctl stop docker-makepkg
+ docker image rm makepkg
+}