summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad70963eaea87602c3a09c0b06c39f60c5aa7a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_appname=xnsketch
pkgname="xnview-${_appname}-bin"
_pkgname=XnSketch
pkgver=1.20
pkgrel=9
pkgdesc="Allows you to turn your photos into cartoon or sketch images."
arch=(
    'i686'
    'x86_64'
)
url="https://www.xnview.com/en/xnsketch/"
license=('LicenseRef-custom')
depends=(
    'gtk2'
    'at-spi2-core'
    'qt5-base'
    'icu'
)
source_i686=("${pkgname%-bin}-${pkgver}-i686.tgz::https://download.xnview.com/XnSketch-linux.tgz")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.tgz::https://download.xnview.com/XnSketch-linux-x64.tgz")
source=("${pkgname%-bin}.sh")
sha256sums=('13aa2bb01a14ac223189f3f9ae58ba03e85631925240b0a22cc5e6bbe460f23c')
sha256sums_i686=('bfc35afc4e333db3cc298bffda1f35beca45e8b1b693bc9a45c5bceb161ceae2')
sha256sums_x86_64=('15273b7e38bcac2b4a34034e383547243b3d086ac57259629e49afabe4adace5')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|${_pkgname}|g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    sed -e "s|/home/pierre/Desktop/${_pkgname}/${_appname}.sh|${pkgname%-bin} %U|g" \
        -e "s|/home/pierre/Desktop/${_pkgname}/${_appname}.png|${pkgname%-bin}|g" \
        -i "${srcdir}/${_pkgname}/${_pkgname}.desktop"
    chmod 644 "${srcdir}/${_pkgname}/${_appname}.png"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 -d "${pkgdir}/opt/${pkgname%-bin}"
    cp -r "${srcdir}/${_pkgname}/"* "${pkgdir}/opt/${pkgname%-bin}"
    ln -sf "/usr/lib/libicui18n.so" "${pkgdir}/opt/${pkgname%-bin}/lib/libicui18n.so.54"
    ln -sf "/usr/lib/libicuuc.so" "${pkgdir}/opt/${pkgname%-bin}/lib/libicuuc.so.54"
    ln -sf "/usr/lib/libicudata.so" "${pkgdir}/opt/${pkgname%-bin}/lib/libicudata.so.54"
    install -Dm644 "${srcdir}/${_pkgname}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
    install -Dm644 "${srcdir}/${_pkgname}/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
    install -Dm644 "${srcdir}/${_pkgname}/license.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}