From 615a07adb91eac4caff273beaec466f317c053d2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 27 Jul 2023 12:55:32 +0200 Subject: PKGBUILD: refactoring --- PKGBUILD | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 59f19ef..ec235f9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,30 +4,30 @@ pkgver=2.0.4 pkgrel=1 pkgdesc='Config file sharing' arch=(any) -url='https://github.com/egor-tensin/config-links' +url="https://github.com/egor-tensin/$pkgname" license=(MIT) depends=(bash) source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") md5sums=(SKIP) package() { - cd "$srcdir" + cd -- "$srcdir" - install -D -m 0644 -t "$pkgdir/usr/share/doc/config-links" "../README.Arch" + install -D -m 0644 -t "$pkgdir/usr/share/doc/$pkgname" "../README.Arch" - cd "$pkgname-$pkgver" + cd -- "$pkgname-$pkgver" - install -D -m 0644 -t "$pkgdir/usr/share/config-links" LICENSE.txt + install -D -m 0644 -t "$pkgdir/usr/share/$pkgname" LICENSE.txt - install -D -m 0644 -t "$pkgdir/usr/share/doc/config-links" README.md + install -D -m 0644 -t "$pkgdir/usr/share/doc/$pkgname" README.md - install -D -m 0755 -t "$pkgdir/usr/lib/config-links" links-update - install -D -m 0755 -t "$pkgdir/usr/lib/config-links" links-remove - install -D -m 0755 -t "$pkgdir/usr/lib/config-links" links-chmod - find src -type f -exec install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" {} ';' + install -D -m 0755 -t "$pkgdir/usr/lib/$pkgname" links-update + install -D -m 0755 -t "$pkgdir/usr/lib/$pkgname" links-remove + install -D -m 0755 -t "$pkgdir/usr/lib/$pkgname" links-chmod + find src -type f -exec install -D -m 0644 -t "$pkgdir/usr/lib/$pkgname/src" {} ';' install -d "$pkgdir/usr/bin" - ln -s -- /usr/lib/config-links/links-update "$pkgdir/usr/bin/" - ln -s -- /usr/lib/config-links/links-remove "$pkgdir/usr/bin/" - ln -s -- /usr/lib/config-links/links-chmod "$pkgdir/usr/bin/" + ln -s -- "/usr/lib/$pkgname/links-update" "$pkgdir/usr/bin/" + ln -s -- "/usr/lib/$pkgname/links-remove" "$pkgdir/usr/bin/" + ln -s -- "/usr/lib/$pkgname/links-chmod" "$pkgdir/usr/bin/" } -- cgit v1.2.3