summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimPilotAdamT2022-04-14 11:35:11 +0100
committerSimPilotAdamT2022-04-14 11:35:11 +0100
commit49233feb44b3b70bc395a61ca5797fc7d0375a72 (patch)
treef0f703366d85dc15f97696ce9a8ea1e7e6bf5df2
parent4a34857c40d9f08a5e25d9d3f683eafe894d8991 (diff)
downloadaur-49233feb44b3b70bc395a61ca5797fc7d0375a72.tar.gz
Allowing for people who are not using SystemD to ensure that the SystemD service does not get installed on their system.
-rw-r--r--.SRCINFO2
-rwxr-xr-x.gitignore2
-rwxr-xr-xPKGBUILD20
3 files changed, 11 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c2d03bf042d2..d3b3edf73f8a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = fetchcord-testing
pkgdesc = FetchCord grabs your OS info and displays it as Discord Rich Presence
pkgver = 2.7.8
- pkgrel = 3
+ pkgrel = 10
url = https://github.com/MrPotatoBobx/fetchcord
install = fetchcord.install
arch = any
diff --git a/.gitignore b/.gitignore
index 3ed2bbbe9561..72fbc7bc3c65 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.git
+*.tar.gz
*.pkg.tar.zst
fetchcord/
pkg/
diff --git a/PKGBUILD b/PKGBUILD
index b9b288b1f868..650eb6570fe0 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=fetchcord-testing
pkgver=2.7.8
-pkgrel=3
+pkgrel=10
pkgdesc="FetchCord grabs your OS info and displays it as Discord Rich Presence"
arch=('any')
url="https://github.com/MrPotatoBobx/fetchcord"
@@ -15,11 +15,6 @@ source=("fetchcord::git+$url#branch=testing")
sha256sums=('SKIP')
install=fetchcord.install
-#pkgver() {
-# cd "$srcdir/fetchcord"
-# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-#}
-
build() {
cd "$srcdir/fetchcord"
python setup.py build
@@ -30,14 +25,15 @@ package() {
python setup.py install --root="$pkgdir" --optimize=1
- systemddir="/usr/lib/systemd/user"
-
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
- if [ -e "$systemddir/fetchcord.service" ]; then
- echo "Not overwriting existing fetchcord.service" && install -Dm644 "$systemddir/fetchcord.service" "$pkgdir$systemddir/fetchcord.service";
- else
- install -Dm644 systemd/fetchcord.service "$pkgdir$systemddir/fetchcord.service";
+ if [[ `systemctl` =~ -\.mount ]]; then
+ systemddir="/usr/lib/systemd/user"
+ if [ -e "$systemddir/fetchcord.service" ]; then
+ echo "Not overwriting existing fetchcord.service" && install -Dm644 "$systemddir/fetchcord.service" "$pkgdir$systemddir/fetchcord.service";
+ else
+ install -Dm644 systemd/fetchcord.service "$pkgdir$systemddir/fetchcord.service";
+ fi
fi
}