summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcaltlgin2020-11-15 17:48:36 +1300
committercaltlgin2020-11-15 17:48:36 +1300
commit27166e340b394102be249d0ecf840ff6d23b75d6 (patch)
tree0bda0286ba9d755fb021cfe994369a020612692d
parent9bc9a9585c923b4874793ab751c22b7b3cc4ae0c (diff)
downloadaur-27166e340b394102be249d0ecf840ff6d23b75d6.tar.gz
Refactored PKGBUILD
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD37
-rw-r--r--rest-client.pngbin86524 -> 0 bytes
4 files changed, 24 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4b3823af48e..251d1103e06 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,13 @@
pkgbase = rest-client-bin
pkgdesc = Tool to test HTTP/RESTful webservices
pkgver = 3.7.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/wiztools/rest-client
arch = any
license = APACHE
+ makedepends = gendesk
makedepends = imagemagick
+ makedepends = libicns
depends = hicolor-icon-theme
depends = java-runtime
provides = rest-client
@@ -14,10 +16,10 @@ pkgbase = rest-client-bin
noextract = restclient-ui-fat-3.7.1.jar
source = https://github.com/wiztools/rest-client/releases/download/3.7.1/restclient-cli-fat-3.7.1.jar
source = https://github.com/wiztools/rest-client/releases/download/3.7.1/restclient-ui-fat-3.7.1.jar
- source = rest-client.png
+ source = rest-client-icon-bd592d85340958b72776569a67a0d8ebfa4ab15b::https://github.com/wiztools/rest-client/raw/bd592d85340958b72776569a67a0d8ebfa4ab15b/restclient-ui/src/main/app-resources/rest-client_30.icns
sha256sums = f85f2c0d516f1834745e50567f6f347b30de0531a2aca8f5476f0f973f9fe819
sha256sums = ea575df3f96841fbe6a294c04e0357a75f3541dab8d418e0f49e43a393a3daee
- sha256sums = 6a00823d6a558919ff9c003546d09acab7f0b5b85bc003ebca9694618925e23d
+ sha256sums = 173cfd6c315b7e85dea2d7afb8c1d6ea0c4ece3014a1a7e5b4153bef3156ad77
pkgname = rest-client-bin
diff --git a/.gitignore b/.gitignore
index 76c90ee1df6..05c6d4d4c97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
!.gitignore
!.SRCINFO
!PKGBUILD
-!rest-client.png
diff --git a/PKGBUILD b/PKGBUILD
index 115d665c404..ad669ef89b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,47 +3,48 @@
_name='RESTClient'
_pkgname='rest-client'
pkgname="${_pkgname}-bin"
+
pkgver=3.7.1
-pkgrel=1
+pkgrel=2
+_commit_icon='bd592d85340958b72776569a67a0d8ebfa4ab15b'
+
pkgdesc='Tool to test HTTP/RESTful webservices'
arch=('any')
url='https://github.com/wiztools/rest-client'
license=('APACHE')
depends=('hicolor-icon-theme' 'java-runtime')
-makedepends=('imagemagick')
+makedepends=('gendesk' 'imagemagick' 'libicns')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
noextract=("${_pkgname/-/}-cli-fat-${pkgver}.jar"
"${_pkgname/-/}-ui-fat-${pkgver}.jar")
-source=("${url}/releases/download/${pkgver}/${_pkgname/-/}-cli-fat-${pkgver}.jar"
- "${url}/releases/download/${pkgver}/${_pkgname/-/}-ui-fat-${pkgver}.jar"
- "${_pkgname}.png")
+source=("${url}/releases/download/${pkgver}/${_pkgname/-/}-"{'cli','ui'}"-fat-${pkgver}.jar"
+ "${_pkgname}-icon-${_commit_icon}::${url}/raw/${_commit_icon}/${_pkgname/-/}-ui/src/main/app-resources/${_pkgname}_30.icns")
sha256sums=('f85f2c0d516f1834745e50567f6f347b30de0531a2aca8f5476f0f973f9fe819'
'ea575df3f96841fbe6a294c04e0357a75f3541dab8d418e0f49e43a393a3daee'
- '6a00823d6a558919ff9c003546d09acab7f0b5b85bc003ebca9694618925e23d')
+ '173cfd6c315b7e85dea2d7afb8c1d6ea0c4ece3014a1a7e5b4153bef3156ad77')
prepare() {
echo -e "#!/bin/sh\ncd /usr/share/${_pkgname} && java -jar ./${_pkgname}-cli.jar" > "${_pkgname}-cli"
echo -e "#!/bin/sh\ncd /usr/share/${_pkgname} && java -jar ./${_pkgname}-ui.jar" > "${_pkgname}-ui"
- cat << EOF > "${_pkgname}.desktop"
-[Desktop Entry]
-Name=${_name}
-Comment=${pkgdesc}
-Icon=${_pkgname}
-Type=Application
-Exec=${_pkgname}-ui
-Categories=Development;
-Encoding=UTF-8
-EOF
+ gendesk -f -n \
+ --pkgname="${_pkgname/-/_}" \
+ --pkgdesc="${pkgdesc}" \
+ --name="${_name}" \
+ --comment="${pkgdesc}" \
+ --exec="${_pkgname}-ui" \
+ --icon="${_pkgname}" \
+ --categories='Development'
}
package() {
install -Dvm755 "${_pkgname}-cli" -t "${pkgdir}/usr/bin"
install -Dvm755 "${_pkgname}-ui" -t "${pkgdir}/usr/bin"
- install -Dvm644 "${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dvm644 "${_pkgname/-/_}.desktop" -t "${pkgdir}/usr/share/applications"
+ icns2png --extract "${_pkgname}-icon-${_commit_icon}"
for i in 16 22 24 32 48 64 96 128 256 512; do
- convert "${_pkgname}.png" -resize "${i}x${i}" "icon${i}.png"
+ convert "${_pkgname}-icon-${_commit_icon}_512x512x32.png" -resize "${i}x${i}" "icon${i}.png"
install -Dvm644 "icon${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${_pkgname}.png"
done
diff --git a/rest-client.png b/rest-client.png
deleted file mode 100644
index 0fe9e20792e..00000000000
--- a/rest-client.png
+++ /dev/null
Binary files differ