summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore5
-rw-r--r--Makefile76
-rw-r--r--PKGBUILD32
4 files changed, 111 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f5c86daeb29c..e1ab6ead4eaa 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,22 @@
pkgbase = libsvg-cairo
pkgdesc = A library for rendering SVG documents
pkgver = 0.1.6
- pkgrel = 11
- url = http://cairographics.org/snapshots
+ pkgrel = 12
+ url = https://cairographics.org/
arch = i686
arch = x86_64
license = LGPL
makedepends = libpng
depends = cairo>=1.4.6
+ depends = glibc
depends = libjpeg
depends = libsvg
+ depends = libxml2
+ depends = libpng
+ depends = zlib
+ options = strip
options = !libtool
source = https://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz
- md5sums = d79da7b3a60ad8c8e4b902c9b3563047
+ b2sums = c890f6b613c15c72d0bc4c64548ed3ee5066e6d32eb1316ec23b68a8a315265cc8351434c9492f83582e858212bacbb951093342002e44dc05724fae5968bfeb
pkgname = libsvg-cairo
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f8b77578b1ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!Makefile
+!PKGBUILD
+!.SRCINFO
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..70ae217ad523
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,76 @@
+MAKEFLAGS += --warn-undefined-variables
+SHELL=/bin/bash
+
+REPO = $(shell grep url .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]')
+VERSION = $(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]')
+TRASH = $(shell git check-ignore * | tr '\n' ' ')
+
+# DEFAULT
+all: clean sum build check pre clean
+
+# just build the package
+build:
+ makepkg -sfr
+
+# build and install the package
+install:
+ makepkg --install
+
+# update checksums
+sum:
+ updpkgsums
+
+# check/lint
+check:
+ @echo "shellcheck: "
+ shellcheck -e SC2148 -e SC2034 PKGBUILD || exit 0
+
+ @echo "shell formate: "
+ shfmt -d PKGBUILD || exit 0
+
+ @echo "checking PKGBUILD: "
+ namcap -i PKGBUILD
+
+ @echo "checking build: "
+ namcap -i *.pkg.*
+
+# clean up the mess
+clean:
+ifeq ($(strip $(TRASH)),)
+ @echo "nothing to clear"
+else
+ file $(TRASH)
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ trash-put -v $(TRASH) ; \
+ exit 0 ; \
+ fi
+endif
+
+# prepare for commit
+pre:
+ shfmt -w PKGBUILD
+ makepkg --printsrcinfo > .SRCINFO
+
+ git diff
+
+ git add PKGBUILD
+ git add .SRCINFO
+ git add .gitignore
+ git add Makefile
+
+# commit with version bump message
+commit:
+ $(eval VERSION := $(shell read -p "enter version (pkgver=$(VERSION)): " enter ; echo $${enter}))
+ @echo "commit message: \"updating to v$(VERSION)\""
+
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ git diff --cached ; \
+ exit 0 ; \
+ fi
+
+ @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \
+ git commit -m "updating to v$(VERSION)" ; \
+ exit 0 ; \
+ fi
+
+ @echo "recheck everything before pushing to AUR"
diff --git a/PKGBUILD b/PKGBUILD
index 4d44c7d85bf3..c281292a3215 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,36 @@
+# Maintainer: zoorat <zoorat [at] protonmail [dot] com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+
pkgname=libsvg-cairo
pkgver=0.1.6
-pkgrel=11
+pkgrel=12
+
pkgdesc="A library for rendering SVG documents"
arch=('i686' 'x86_64')
+url="https://cairographics.org/"
license=('LGPL')
-url="http://cairographics.org/snapshots"
-depends=('cairo>=1.4.6' 'libjpeg' 'libsvg')
+
+depends=('cairo>=1.4.6'
+ 'glibc'
+ 'libjpeg'
+ 'libsvg'
+ 'libxml2'
+ 'libpng'
+ 'zlib')
+
makedepends=('libpng')
+options=(strip !libtool)
+
source=(https://cairographics.org/snapshots/$pkgname-$pkgver.tar.gz)
-md5sums=('d79da7b3a60ad8c8e4b902c9b3563047')
-options=(!libtool)
+b2sums=('c890f6b613c15c72d0bc4c64548ed3ee5066e6d32eb1316ec23b68a8a315265cc8351434c9492f83582e858212bacbb951093342002e44dc05724fae5968bfeb')
build() {
- cd $srcdir/$pkgname-$pkgver
- ./configure --prefix=/usr --disable-static
- make
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --disable-static
+ make
}
package() {
- cd $srcdir/$pkgname-$pkgver
- make DESTDIR=$pkgdir install
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
}