summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d0e85d541bf56767a79f3e3e365a6e26e41931d (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: Connor Reeder <connor dot reeder at ymail dot com>

pkgname='teamwork-timer'
pkgver=2.1.1
pkgrel=1
pkgdesc='Timer app - the perfect complement to Teamwork.'
arch=('x86_64')
url='https://www.teamwork.com/'
license=('unknown')
depends=('fuse2' 'zlib' 'hicolor-icon-theme')
options=(!strip)
_shortname='teamworktimer'
_appimage="Teamwork+Timer-${pkgver}.AppImage"
source=(
		"https://s3.amazonaws.com/tw-open/timer/${_appimage}"
)
sha256sums=(
		'ae9a04a2394117ad9daa212b83efe17b5189b8c4e15346467296ffcb8aba0f59'
)

prepare() {
    chmod +x ${_appimage}
    ./${_appimage} --appimage-extract
}

package() {
    cd "$srcdir"

    # Create Directories
    install -d "${pkgdir}/usr/bin"
    install -dm755 "${pkgdir}/usr/share/icons/hicolor"

    # Install AppImage
    install -Dm755 "${_appimage}" -t "${pkgdir}/opt/${_shortname}"

    # Install Icons, Desktop Shortcut
    find squashfs-root -type d -exec chmod 0755 {} \;
    cp -r squashfs-root/usr/share/icons/hicolor "${pkgdir}/usr/share/icons/"
    sed -i -E "s|Exec=AppRun %U|Exec=/usr/bin/${_shortname}|" "squashfs-root/${_shortname}.desktop"
    install -Dm644 "squashfs-root/${_shortname}.desktop" -t "${pkgdir}/usr/share/applications/"

    # Symlink AppImage
    ln -s "/opt/${_shortname}/${_appimage}" "${pkgdir}/usr/bin/${_shortname}"
}