diff options
author | Daniel Bermond | 2019-06-15 01:11:49 +0000 |
---|---|---|
committer | Daniel Bermond | 2019-06-15 01:11:49 +0000 |
commit | 43aec0b08bdbaf9ba1a2f7bc7842a377f0151314 (patch) | |
tree | cc6dab1ebcec0fd2c05299081cd62c8c2ac9fc17 /PKGBUILD | |
download | aur-43aec0b08bdbaf9ba1a2f7bc7842a377f0151314.tar.gz |
Initial commit of torrentzip.net-git
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6d7e1a75c45c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,98 @@ +# Maintainer : Daniel Bermond < gmail-com: danielbermond > + +pkgname=torrentzip.net-git +_srcname=RVWorld +pkgver=r17.7513f4e +pkgrel=1 +pkgdesc='Torrentzip utility with mutli core processing capability (git version)' +arch=('any') +url='http://www.romvault.com/trrntzip/' +license=('MIT') +depends=('mono' 'sh' 'hicolor-icon-theme') +makedepends=('git' 'imagemagick') +provides=('torrentip.net') +conflicts=('torrentip.net') +source=('git+https://github.com/RomVault/RVWorld.git' + 'TrrntZip.NET' + 'TrrntZipUI' + 'torrentzip.net.desktop' + 'torrentzip.net-git-no-ilmerge.patch' + 'torrentzip.net-git-fix-case.patch' + 'torrentzip.net-git-linux-fix.patch') +sha256sums=('SKIP' + 'fcec85063da4f78dc853f443493709458ae627aaf8968476c7ea02056b0982b0' + 'af32f3a2609a9eae37a2c836b0a4961230cfdffec6080d23fc94c5a0c4a181f0' + 'ab1f7bd79b7f255ee93b7986e3b8674eb32150c1043e349f351db2c29788aebe' + '6173068d16ca19f6b8e29cf176d0633a5b4a81b2986bd36a85e0fe5fa095a9f6' + '5f54911530550c5e4379422cbacea6258c7a0e07429b3530a12a6daad157585e' + '170fc46eb2af90ad47a76bbc3827219f024fe9b5df95b317202396ec299ae06d') + +prepare() { + cd "$_srcname" + + # apply patches: + ## - do not statically link with ilmerge + ## - fix case to allow building on linux + ## - other linux fixes: more case fixes and .zip filename fix + for _patch in "${source[@]}" + do + [ "${_patch##*.}" != 'patch' ] && continue + printf '%s\n' " -> Applying patch '${_patch}'..." + patch -Np1 -i "${srcdir}/${_patch}" + done + + # convert .ico to suitable formats + cd TrrntZipUI + magick convert memory-rom.ico torrentzip.net.png + magick convert memory-rom.ico torrentzip.net.svg +} + +pkgver() { + cd "$_srcname" + + # git, no tags available + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + printf '%s\n' ' -> Building TorrnetZip.NET CLI...' + cd "${_srcname}/TrrntZipCMD" + xbuild /p:Configuration='Release' TrrntZipCMD.csproj + + printf '%s\n' ' -> Building TorrnetZip.NET GUI...' + cd "${srcdir}/${_srcname}/TrrntZipUI" + xbuild /p:Configuration='Release' TrrntZipUI.csproj +} + +package() { + local _pkgbasename="${pkgname%-git}" + + # launchers + install -D -m755 TrrntZip.NET -t "${pkgdir}/usr/bin" + install -D -m755 TrrntZipUI -t "${pkgdir}/usr/bin" + ln -s TrrntZip.NET "${pkgdir}/usr/bin/trrntzip.net" + ln -s TrrntZipUI "${pkgdir}/usr/bin/trrntzip.net-ui" + + # binaries + cd "$_srcname" + install -D -m644 TrrntZipCMD/bin/Release/* -t "${pkgdir}/usr/lib/${_pkgbasename}" + install -D -m644 TrrntZipUI/bin/Release/TrrntZipUI.* -t "${pkgdir}/usr/lib/${_pkgbasename}" + + # desktop file + install -D -m644 "${srcdir}/torrentzip.net.desktop" -t "${pkgdir}/usr/share/applications" + + # icons + local _icon + local -a _icons + local _size + mapfile -t -d '' _icons < <(find TrrntZipUI -type f -name 'torrentzip.net*.png' -print0) + for _icon in "${_icons[@]}" + do + _size="$(magick identify -format '%[fx:w]' "$_icon")" + install -D -m644 "$_icon" "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/${_pkgbasename}.png" + done + install -D -m644 TrrntZipUI/torrentzip.net.svg -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps" + + # license + install -D -m644 "${srcdir}/${_srcname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" +} |