Mail archive
alpine-aports

Re: [alpine-aports] [PATCH 1/5] testing/libftdi: new aport

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Mon, 16 May 2016 17:26:01 +0200

Sorry for late response.

On Fri, 15 Apr 2016 17:22:43 +0200
Stefan Wagner <stw_at_bit-strickerei.de> wrote:

> A library to talk to FTDI chips
> http://www.intra2net.com/en/developer/libftdi/download.php
> ---
> testing/libftdi/APKBUILD | 40 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 testing/libftdi/APKBUILD
>
> diff --git a/testing/libftdi/APKBUILD b/testing/libftdi/APKBUILD
> new file mode 100644
> index 0000000..f096d00
> --- /dev/null
> +++ b/testing/libftdi/APKBUILD
> _at_@ -0,0 +1,40 @@
> +# Contributor: Stefan Wagner <stw_at_bit-strickerei.de>
> +# Maintainer: Stefan Wagner <stw_at_bit-strickerei.de>
> +pkgname=libftdi

tarball is called libftdi1-1.2.tar.gz. Why dont we call the package
"libftdi1"?

> +pkgver=1.2
> +pkgrel=0
> +pkgdesc="A library to talk to FTDI chips"
> +url="http://www.intra2net.com/en/developer/libftdi/download.php"
> +arch="x86_64"

any reason that it does not build on 32bit x86?

> +license="LGPL2, GPL2"
> +depends="libusb"

abuild will normally figure out the SO dependencies itself so I would
expect that you don't need the depends.

> +makedepends="cmake doxygen swig libusb-dev"
> +subpackages="$pkgname-dev $pkgname-doc"
> +source="http://www.intra2net.com/en/developer/libftdi/download/${pkgname}1-${pkgver}.tar.bz2"
> +
> +builddir="$srcdir/${pkgname}1-${pkgver}/build"
> +prepare() {
> + mkdir "$builddir"
> + cd "$builddir"
> + sed -i 's|LIB_SUFFIX 64|LIB_SUFFIX ""|' ../CMakeLists.txt

I would prefer a patch instead of sed, incase future version
fixes/changes things. With sed we may end up with unexpected
modifications.

> +}
> +
> +build() {
> + cd "$builddir"
> + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_BUILD_RPATH=ON \
> + -DCMAKE_BUILD_TYPE=Release -DEXAMPLES=OFF -DFTDI_EEPROM=ON .. || return 1
> + make
> +}
> +
> +package() {
> + cd "$builddir"
> + make DESTDIR="$pkgdir" install || return 1
> + install -Dm644 ../packages/99-libftdi.rules "$pkgdir"/usr/lib/udev/rules.d/99-libftdi.rules || return 1
> + mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ "$pkgdir"/usr/share/man/man3/ || return 1
> + install -m644 doc/html/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1
> + install -m644 doc/man/man3/ftdi_eeprom.3 "$pkgdir"/usr/share/man/man3/ || return 1
> +}
> +
> +md5sums="89dff802d89c4c0d55d8b4665fd52d0b libftdi1-1.2.tar.bz2"
> +sha256sums="a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6 libftdi1-1.2.tar.bz2"
> +sha512sums="d175e2b39dda880653a2e46db67e49a8921095e69eff6598159c3c31292d4ce76617c2f1617fd6727b08c930fcea335d8ef01857debbb60e7ac384b516d38a05 libftdi1-1.2.tar.bz2"



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon May 16 2016 - 17:26:01 GMT