added xdg-user-dirs as makedepends && rewrite pkgbuild

This commit is contained in:
yjun 2020-11-01 10:53:48 +08:00
parent 90780d48b9
commit 4cd1f098e7
2 changed files with 17 additions and 11 deletions

View file

@ -1,10 +1,11 @@
pkgbase = todesk-bin pkgbase = todesk-bin
pkgdesc = Remote control and team work pkgdesc = Remote control and team work
pkgver = 1.0.0 pkgver = 1.0.0
pkgrel = 2 pkgrel = 3
url = https://www.todesk.cn/ url = https://www.todesk.cn/
arch = x86_64 arch = x86_64
license = custom license = custom
makedepends = xdg-user-dirs
provides = todesk provides = todesk
conflicts = todesk conflicts = todesk
source = local://todesk20201010f.deb source = local://todesk20201010f.deb

View file

@ -5,11 +5,12 @@ _pkgname=${pkgname%-bin}
pkgver=1.0.0 pkgver=1.0.0
_pkgver_ext=20201010f _pkgver_ext=20201010f
_pkg_file_name=${_pkgname}${_pkgver_ext}.deb _pkg_file_name=${_pkgname}${_pkgver_ext}.deb
pkgrel=2 pkgrel=3
pkgdesc="Remote control and team work" pkgdesc="Remote control and team work"
arch=('x86_64') arch=('x86_64')
url="https://www.todesk.cn/" url="https://www.todesk.cn/"
license=('custom') license=('custom')
makedepends=('xdg-user-dirs')
provides=("${pkgname%-bin}") provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}") conflicts=("${pkgname%-bin}")
source=("local://${_pkg_file_name}") source=("local://${_pkg_file_name}")
@ -28,18 +29,22 @@ if [ ! -f ${PWD}/${_pkg_file_name} ]; then
fi fi
package() { package() {
bsdtar -o --no-same-permissions -xf ${srcdir}/data.tar.xz -C ${pkgdir} install -dm 755 ${srcdir}/${_pkgname}
install -Dm755 ${pkgdir}/usr/local/bin/${_pkgname} -t ${pkgdir}/usr/bin/ tar --owner=root --group=root -xf ${srcdir}/data.tar.xz -C ${srcdir}/${_pkgname}
rm -rf ${pkgdir}/usr/local
# fixed permission cd ${srcdir}/${_pkgname}/
install -dm755 ${pkgdir}/opt/todesk/lib
install -Dm 755 usr/local/bin/${_pkgname} -t ${pkgdir}/usr/bin/
# dir and lib
find opt/ -type d -exec install -dm 755 ${pkgdir}/{} \;
find opt/ -type f -exec install -Dm 755 {} ${pkgdir}/{} \;
# desktop entry # desktop entry
sed -i "s|Emulator||g" ${pkgdir}/usr/share/applications/${_pkgname}.desktop install -Dm 644 usr/share/applications/${_pkgname}.desktop -t ${pkgdir}/usr/share/applications
sed -i "s|Emulator;||g" ${pkgdir}/usr/share/applications/${_pkgname}.desktop
# deleted unneed ico # icon
rm -rf ${pkgdir}/usr/share/pixmaps/128.png install -Dm 644 usr/share/pixmaps/${_pkgname}.png -t ${pkgdir}/usr/share/pixmaps
} }
# vim: set sw=2 ts=2 et: # vim: set sw=2 ts=2 et: