diff options
author | XZS | 2017-03-14 23:16:57 +0100 |
---|---|---|
committer | XZS | 2017-03-14 23:39:06 +0100 |
commit | a8b901a6b7442530309ed9c0e450b286ef88a8a0 (patch) | |
tree | 589ebbbfebcd6737e3513a4b0c7045bbb7efd333 | |
parent | 3afc4c15a24a7bdb39646fc78ed4a7d55b59ae09 (diff) | |
download | aur-a8b901a6b7442530309ed9c0e450b286ef88a8a0.tar.gz |
generate desktop file
This creates a central definition point for all information, eliminating
duplicated texts in the desktop file.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | minimetro.desktop | 6 |
3 files changed, 8 insertions, 6 deletions
@@ -17,7 +17,7 @@ pkgbase = minimetro source = minimetro.desktop source = minimetro.png::http://dinopoloclub.com/press/mini_metro/images/icon.png md5sums = 765bfdb52584df48784728e6476f47d7 - md5sums = 0fe19f989f9606a825b67b9b379c9d6c + md5sums = 4b6c5e6caaa5c27cc66d8399aa29672d md5sums = 8412b1e4cc11be455af993d921a68ced pkgname = minimetro @@ -20,7 +20,7 @@ source=("hib://${_longname/ }-${pkgver}-linux.tar.gz" "${pkgname}.desktop" "${pkgname}.png::http://dinopoloclub.com/press/mini_metro/images/icon.png") md5sums=('765bfdb52584df48784728e6476f47d7' - '0fe19f989f9606a825b67b9b379c9d6c' + '4b6c5e6caaa5c27cc66d8399aa29672d' '8412b1e4cc11be455af993d921a68ced') package() { @@ -45,5 +45,7 @@ package() { echo "#!/opt/$pkgname/$_longname.$CARCH" > "$pkgdir"/usr/bin/${pkgname} chmod +x "$pkgdir"/usr/bin/$pkgname - cp ${pkgname}.desktop "$pkgdir"/usr/share/applications + + longname="$_longname" pkgname="$pkgname" \ + envsubst < "$pkgname.desktop" > "$pkgdir/usr/share/applications/$pkgname.desktop" } diff --git a/minimetro.desktop b/minimetro.desktop index 340e44720c43..d53cceccc3f4 100644 --- a/minimetro.desktop +++ b/minimetro.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 Encoding=UTF-8 -Name=Mini Metro -Exec=minimetro -Icon=minimetro +Name=$longname +Exec=$pkgname +Icon=$pkgname Type=Application Categories=Game;StrategyGame;Simulation; |