void-packages/srcpkgs/iniparser/template
maxice8 cd6bc02165 iniparser: update to 4.1. (#8933)
* iniparser: update to 4.1.

* cava: rebuild against libiniparser.so.1

* cava-gui: rebuild against libiniparser.so.1
2017-11-06 12:07:18 +01:00

76 lines
1.8 KiB
Bash

# Template file for 'iniparser'
pkgname=iniparser
version=4.1
revision=1
build_style=gnu-makefile
hostmakedepends="doxygen chrpath"
short_desc="A free stand-alone ini file parsing library"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="MIT"
homepage="http://ndevilla.free.fr/iniparser/"
distfiles="https://github.com/ndevilla/iniparser/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=960daa800dd31d70ba1bacf3ea2d22e8ddfc2906534bf328319495966443f3ae
CFLAGS="-fPIC"
post_build() {
sed -i example/Makefile \
-e"s;^\(CFLAGS.*=.*\);& $CFLAGS;" \
-e"s;^\(LFLAGS.*=.*\);& $LDFLAGS;" \
-e's;$(CC) $(CFLAGS);& $(LDFLAGS);'
make CC=$CC example
make docs
}
do_install() {
vlicense LICENSE
# Install header files
vmkdir usr/include
vcopy "src/*.h" usr/include
# Install libraries
vmkdir usr/lib
vcopy "libiniparser.*" usr/lib
ln -s libiniparser.so.1 ${DESTDIR}/usr/lib/libiniparser.so
chrpath -d ${DESTDIR}/usr/lib/libiniparser.so
# Install pkg-config file
vmkdir usr/lib/pkgconfig
sed ${FILESDIR}/${pkgname}.pc \
-e "s;@PKGNAME@;$pkgname;g" \
-e "s;@VERSION@;$version;g" \
> ${DESTDIR}/usr/lib/pkgconfig/${pkgname}.pc
# Install example source and binaries
vmkdir usr/share/${pkgname}/example
vcopy "${wrksrc}/example/*" usr/share/${pkgname}/example
# Install documentation
vmkdir usr/share/doc/${pkgname}
vcopy "${wrksrc}/html/*" usr/share/doc/${pkgname}
}
iniparser-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
iniparser-doc_package() {
short_desc+=" - documentation"
noarch=yes
pkg_install() {
vmove usr/share/doc/iniparser
}
}
iniparser-example_package() {
short_desc+=" - example code"
pkg_install() {
vmove usr/share/iniparser/example
}
}