diff options
author | EndlessEden | 2021-09-01 08:37:00 +1000 |
---|---|---|
committer | EndlessEden | 2021-09-01 08:37:00 +1000 |
commit | 9a7f2d2339da01cd9fa2a19c99b3d5d61cd5a228 (patch) | |
tree | bdd9474dc15b54d2b6cc6f038bbe34c2f9d2180d | |
download | aur-9a7f2d2339da01cd9fa2a19c99b3d5d61cd5a228.tar.gz |
init: Copied most of the Archlinux PKGBUILD. THANK YOU upstream maintainers for being so considerate on the PKGBUILD, pkgver and sources are perfect.
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 64 |
2 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9f776bfd180b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = libgphoto2-git + pkgdesc = Digital camera access library + pkgver = 2.5.27+125+g590698165 + pkgrel = 1 + url = http://www.gphoto.org/ + arch = x86_64 + license = LGPL + makedepends = autoconf-archive + makedepends = git + depends = libexif + depends = libjpeg + depends = gd + depends = libltdl + depends = libusb + depends = libxml2 + depends = curl + provides = libgphoto2.so + provides = libgphoto2-git + provides = libgphoto2 + conflicts = libgphoto2 + replaces = libgphoto2 + source = libgphoto2-git::git+https://github.com/gphoto/libgphoto2 + sha256sums = SKIP + +pkgname = libgphoto2-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8d9f2e147789 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Endlesseden <eden @ rose.place> +# Archlinux Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org> +# Archlinux Contributor: Jan de Groot <jgc@archlinux.org> +# Archlinux Contributor: Tom Gundersen <teg@jklm.no> +# Archlinux Contributor: Eduardo Romero <eduardo@archlinux.org> +# Archlinux Contributor: Damir Perisa <damir.perisa@bluewin.ch> + +pkgname=libgphoto2-git +_pkgname=libgphoto2 +pkgver=2.5.27+125+g590698165 +pkgrel=1 +pkgdesc="Digital camera access library" +url="http://www.gphoto.org/" +arch=(x86_64) +license=(LGPL) +conflicts=("$_pkgname") +replaces=("$_pkgname") +depends=(libexif libjpeg gd libltdl libusb libxml2 curl) +makedepends=(autoconf-archive git) +provides=('libgphoto2.so' "$pkgname" "$_pkgname") + +source=("$pkgname"::"git+https://github.com/gphoto/libgphoto2") +sha256sums=('SKIP') + +pkgver() { + cd $pkgname + git describe --tags | sed 's/^libgphoto2-//;s/-release//;s/^v//;s/_/./g;s/-/+/g' +} + +prepare() { + cd $pkgname + autoreconf -fvi +} + +build() { + cd $pkgname + ./configure --prefix=/usr --disable-rpath + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool + make +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install + + # Remove unused udev helper + rm -r "$pkgdir/usr/lib/udev" + + _genudev +} + +_genudev() ( + cd "$pkgdir/usr/lib/libgphoto2" + + export LD_LIBRARY_PATH="$pkgdir/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + export CAMLIBS="$PWD/$pkgver" + + ./print-camera-list hwdb \ + | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/hwdb.d/20-gphoto.hwdb" + ./print-camera-list udev-rules version 201 \ + | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/rules.d/40-gphoto.rules" +) + +# vim:set sw=2 et: |