summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 40820b66a75cb3234c514d8863dfa3c6d2429a34 (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
# Maintainer: Guillaume Hayot <ghayot@postblue.info>
pkgname=ghost-desktop
pkgver=1.5.2
pkgrel=1
pkgdesc="Ghost Desktop is a beautiful desktop application that allows you to easily manage multiple Ghost blogs and work without distractions."
arch=('x86_64' 'i686') 
url="https://github.com/TryGhost/Ghost-Desktop"
license=('MIT')
depends=('gtk2' 'libgnome-keyring' 'gnome-keyring' 'desktop-file-utils' 'python2' 'gconf' 'nodejs' 'libnotify' 'libxtst' 'nss' 'alsa-lib' 'libxss')
source=(https://github.com/TryGhost/Ghost-Desktop/releases/download/v${pkgver}/${pkgname}-${pkgver}-debian.deb)
install=${pkgname}.install
md5sums=('90ad4039510cc42734ee31436639b000')
package() {
    msg2 "Extracting data.tar.xz..."
    bsdtar -xf data.tar.xz -C "${pkgdir}/"

    msg2 "Fixing file permissions..."
    find "${pkgdir}"/usr -type f -exec chmod 644 {} \;
    find "${pkgdir}"/usr/bin -type f -exec chmod 755 {} \;
    find "${pkgdir}"/usr -type d -exec chmod 755 {} \;
    
    msg2 "Cleaning up package..."
    rm -rf "${pkgdir}/usr/bin/Ghost"
    rm -rf "${pkgdir}/usr/share/lintian"
    
    msg2 "Changing paths and names to match package name..."
    mv "${pkgdir}/usr/share/applications/Ghost.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
    sed -i "s/Exec=Ghost/Exec=${pkgname}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
    sed -i "s/Icon=Ghost/Icon=${pkgname}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
    mv "${pkgdir}/usr/share/doc/Ghost" "${pkgdir}/usr/share/doc/${pkgname}"
    mv "${pkgdir}/usr/share/pixmaps/Ghost.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
    mv "${pkgdir}/usr/lib/Ghost" "${pkgdir}/usr/lib/${pkgname}"
    mv "${pkgdir}/usr/lib/${pkgname}/Ghost" "${pkgdir}/usr/lib/${pkgname}/${pkgname}"
    
    msg2 "Fixing exectuable..."
    chmod +x "${pkgdir}/usr/lib/${pkgname}/${pkgname}"
    ln -s "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
    ln -s "/usr/lib/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}