From 872c127908eeecfe969f977553b771f631cc067e Mon Sep 17 00:00:00 2001 From: davedatum Date: Sat, 15 Feb 2020 12:22:54 +0000 Subject: [PATCH] added install script to enable systemd autostart --- .SRCINFO | 10 +++++++--- .gitignore | 4 +++- PKGBUILD | 19 ++++++++++++++----- calamares-install.hook | 10 ++++++++++ calamares-install.install | 7 +++++++ 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 calamares-install.hook create mode 100644 calamares-install.install diff --git a/.SRCINFO b/.SRCINFO index 3d80bbb..883b40d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,14 +1,18 @@ pkgbase = tromjaro-calamares-theme pkgdesc = Theme for calamares - pkgver = 3.2.15 - pkgrel = 1.3 + pkgver = 3.2.18 + pkgrel = 1 url = https://gitlab.com/tromsite/tromjaro/calamares-settings arch = any license = GPL3 makedepends = git depends = calamares - source = tromjaro-calamares-theme::git+https://gitlab.com/tromsite/tromjaro/calamares-settings.git#commit=e8f77a0a3b1ce942ebac18fc399516e8180a3ce0 + source = tromjaro-calamares-theme::git+https://gitlab.com/tromsite/tromjaro/calamares-settings.git#commit=c0bcac94f05e559801d28d2bd24eef5cc2823ae9 + source = calamares-install.hook + source = calamares-install.install sha256sums = SKIP + sha256sums = c45e567fe629bf1b2c670d08ccc44374f0ae3646dda00da4dcc0077aa7f2f6e8 + sha256sums = 792f8773a590515dcffa08f1c2eb906efd99aac630bbd3f5b70a358f3a7f8e7c pkgname = tromjaro-calamares-theme diff --git a/.gitignore b/.gitignore index f22f572..5aca7a3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ !.git !.gitignore !.SRCINFO -!PKGBUILD \ No newline at end of file +!PKGBUILD +!calamares-install.hook +!calamares-install.install \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD index 1802d41..ce82493 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,20 +1,29 @@ # Maintainer: davedatum pkgname=tromjaro-calamares-theme -pkgver=3.2.15 -pkgrel=1.5 +pkgver=3.2.18 +pkgrel=1 pkgdesc="Theme for calamares" arch=("any") url="https://gitlab.com/tromsite/tromjaro/calamares-settings" license=("GPL3") depends=("calamares") makedepends=("git") -source=("${pkgname}::git+${url}.git#commit=c0bcac94f05e559801d28d2bd24eef5cc2823ae9") -sha256sums=('SKIP') +source=("${pkgname}::git+${url}.git#commit=c0bcac94f05e559801d28d2bd24eef5cc2823ae9" + "calamares-install.hook" + "calamares-install.install") +sha256sums=('SKIP' + 'c45e567fe629bf1b2c670d08ccc44374f0ae3646dda00da4dcc0077aa7f2f6e8' + '792f8773a590515dcffa08f1c2eb906efd99aac630bbd3f5b70a358f3a7f8e7c') package() { - install -d "${pkgdir}/etc" cp -r "${srcdir}/${pkgname}/calamares" "${pkgdir}/etc/" + install -Dm644 "${srcdir}/calamares-install.hook" "${pkgdir}/usr/share/libalpm/hooks/calamares-install.hook" + install -d "${pkdir}/etc/systemd/system" + cp -r "${srcdir}/${pkgname}/systemd/*" "${pkgdir}/etc/systemd/system/" + + install -Dm644 "${srcdir}/${pkgbase}/calamares-launch-script.sh" \ + "${pkgdir}/usr/bin/calamares-launch-script" } diff --git a/calamares-install.hook b/calamares-install.hook new file mode 100644 index 0000000..c9b8ad3 --- /dev/null +++ b/calamares-install.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = tromjaro-calamares-theme + +[Action] +Description = enable systemd timer + service for calamares_polkit +When = PostTransation +Exec = /bin/bash -c '/usr/bin/calamares-launch-script' \ No newline at end of file diff --git a/calamares-install.install b/calamares-install.install new file mode 100644 index 0000000..554ae89 --- /dev/null +++ b/calamares-install.install @@ -0,0 +1,7 @@ +post_install() { + chmod +x /usr/bin/calamares-launch-script +} + +post_upgrade() { + post_install +} \ No newline at end of file