diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | drawpile.install | 29 |
3 files changed, 62 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = drawpile pkgdesc = Collaborative drawing program specially made for use with pen tablets pkgver = 1.0.1 - pkgrel = 1 + pkgrel = 2 url = http://drawpile.net/ install = drawpile.install arch = x86_64 @@ -12,13 +12,14 @@ pkgbase = drawpile makedepends = ninja makedepends = cmake depends = karchive - depends = kdnssd - depends = desktop-file-utils - depends = qt5-color-picker - depends = qt5-multimedia - depends = miniupnpc depends = giflib - depends = libmicrohttpd + depends = qt5-multimedia + depends = desktop-file-utils + optdepends = kdnssd: automatic service discovery (such as printers) + optdepends = qt5-color-picker: alternative color wheel + optdepends = miniupnpc: UPnP support + optdepends = libmicrohttpd: web-admin feature (server dependency) + optdepends = libsystemd: systemd and logging support (server dependency) source = http://drawpile.net/files/src/drawpile-1.0.1.tar.gz sha256sums = 93d265ca48af01b845907857080400eeb02ed0b732f105bb52b1e2990eb941d5 @@ -4,17 +4,21 @@ pkgname=drawpile pkgver=1.0.1 -pkgrel=1 +pkgrel=2 pkgdesc='Collaborative drawing program specially made for use with pen tablets' arch=('x86_64' 'i686') url='http://drawpile.net/' license=('GPL2') -depends=('karchive' 'kdnssd' 'desktop-file-utils' 'qt5-color-picker' 'qt5-multimedia' 'miniupnpc' 'giflib' 'libmicrohttpd') +depends=('karchive' 'giflib' 'qt5-multimedia' 'desktop-file-utils') +optdepends=('kdnssd: automatic service discovery (such as printers)' 'qt5-color-picker: alternative color wheel' 'miniupnpc: UPnP support' 'libmicrohttpd: web-admin feature (server dependency)' 'libsystemd: systemd and logging support (server dependency)') makedepends=('qt5-tools' 'qt5-svg' 'ninja' 'cmake') install="${pkgname}.install" source=("http://drawpile.net/files/src/${pkgname}-${pkgver}.tar.gz") sha256sums=('93d265ca48af01b845907857080400eeb02ed0b732f105bb52b1e2990eb941d5') + ## SET TO 'SERVER' OR 'CLIENT' FOR BUILDING SERVER OR CLIENT ONLY ## + BUILD='BOTH' + build() { cd "${pkgname}-${pkgver}" @@ -23,7 +27,24 @@ build() { mkdir -p build cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -G Ninja -Wno-dev + local makeargs='' + + if [ -z "$BUILD" ]; then + BUILD='BOTH' + fi + + if [ "$BUILD" == 'CLIENT' ]; then + warning 'BUILDING CLIENT ONLY.' + makeargs='-DSERVER=off' + elif [ "$BUILD" == 'SERVER' ]; then + warning 'BUILDING STAND-ALONE SERVER ONLY.' + makeargs='-DCLIENT=off' + elif [ "$BUILD" != 'BOTH' ]; then + error "You can set 'BUILD' TO 'SERVER', 'CLIENT' or 'BOTH' only!" + return 1 + fi + + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -G Ninja -Wno-dev $makeargs ninja } @@ -31,8 +52,8 @@ package() { cd "${pkgname}-${pkgver}" DESTDIR="$pkgdir" ninja -C build install - install -Dm644 "desktop/$pkgname-128x128.png" \ - "$pkgdir/usr/share/pixmaps/$pkgname.png" - install -Dm644 "desktop/$pkgname.desktop" \ - "$pkgdir/usr/share/applications/$pkgname.desktop" -}
\ No newline at end of file + install -Dm644 "desktop/${pkgname}-128x128.png" \ + "${pkgdir}/usr/share/pixmaps/${pkgname}.png" + install -Dm644 "desktop/${pkgname}.desktop" \ + "${pkgdir}/usr/share/applications/${pkgname}.desktop" +} diff --git a/drawpile.install b/drawpile.install index b8c7ebf27b7e..ace6a9c3f0df 100644 --- a/drawpile.install +++ b/drawpile.install @@ -1,11 +1,32 @@ -post_install() { +# Colored makepkg-like functions +msg_blue() { + printf "${blue}==>${bold} $1${all_off}\n" +} + +note() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +yellow="${bold}$(tput setaf 3)" +blue="${bold}$(tput setaf 4)" + +_update() { + msg_blue 'Updating desktop MIME database...' update-desktop-database -q } +post_install() { + _update + note "If installing optional dependencies afterwards you may have to recompile this package." + #note "If you wish to only install the server or client set 'BUILD' to 'SERVER' or 'CLIENT' in the PKGBUILD file and recompile this package." +} + post_upgrade() { - post_install + _update } post_remove() { - post_install -} + _update +}
\ No newline at end of file |