-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
72 lines (65 loc) · 2.24 KB
/
template
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Template file for 'libgphoto2'
pkgname=libgphoto2
version=2.5.31
revision=1
build_style=gnu-configure
configure_args="--disable-static --disable-rpath udevscriptdir=/usr/lib/udev"
hostmakedepends="automake gettext-devel libtool pkg-config"
makedepends="gd-devel libexif-devel libltdl-devel libusb-compat-devel
libxml2-devel"
depends="libgphoto2-udev-rules"
short_desc="Digital camera access library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.gphoto.org"
changelog="https://raw.githubusercontent.com/gphoto/libgphoto2/master/NEWS"
distfiles="https://github.com/gphoto/libgphoto2/releases/download/v${version}/libgphoto2-${version}.tar.bz2"
checksum=4f81c34c0b812bee67afd5f144940fbcbe01a2055586a6a1fa2d0626024a545b
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" libgphoto2"
fi
pre_configure() {
autoreconf -fi
}
post_install() {
# Remove unused udev helper
rm -rf ${DESTDIR}/usr/lib/udev
# Remove recursive symlink
rm -f ${DESTDIR}/usr/include/gphoto2/gphoto2
vmkdir usr/lib/udev/hwdb.d
vmkdir usr/lib/udev/rules.d
if [ -z "$CROSS_BUILD" ]; then
LD_LIBRARY_PATH="${DESTDIR}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${DESTDIR}/usr/lib/libgphoto2/${version}" \
${DESTDIR}/usr/lib/libgphoto2/print-camera-list udev-rules version 201 > \
${DESTDIR}/usr/lib/udev/rules.d/40-gphoto.rules
LD_LIBRARY_PATH="${DESTDIR}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
CAMLIBS="${DESTDIR}/usr/lib/libgphoto2/${version}" \
${DESTDIR}/usr/lib/libgphoto2/print-camera-list hwdb > \
${DESTDIR}/usr/lib/udev/hwdb.d/20-gphoto.hwdb
else
/usr/lib/libgphoto2/print-camera-list udev-rules version 201 > \
${DESTDIR}/usr/lib/udev/rules.d/40-gphoto.rules
/usr/lib/libgphoto2/print-camera-list hwdb > \
${DESTDIR}/usr/lib/udev/hwdb.d/20-gphoto.hwdb
fi
}
libgphoto2-udev-rules_package() {
short_desc+=" - udev rules"
pkg_install() {
vmove usr/lib/udev/hwdb.d
vmove usr/lib/udev/rules.d
}
}
libgphoto2-devel_package() {
depends="libexif-devel libusb-compat-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/doc
vmove usr/share/man/man3
}
}