summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Hüsers2015-08-10 16:15:39 +0200
committerManuel Hüsers2015-08-10 16:15:39 +0200
commit3aa4db8f24ac6c38c17080b3837f144bcb20923d (patch)
tree79f77ab881488767686132d73382401829b63ea5
parentb602e01dfadffb3e7f5889911bee6f5d61007045 (diff)
downloadaur-3aa4db8f24ac6c38c17080b3837f144bcb20923d.tar.gz
New release
Moved some dependencies to optional again Added support for only building client or server version fo this package (May be split in future) Added notifications that package may have to be recompiled after installing optional packages
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD37
-rw-r--r--drawpile.install29
3 files changed, 62 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cac5e0474e6..7d8084cba12 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 4ad7cf6d679..6a2481d77c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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 b8c7ebf27b7..ace6a9c3f0d 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