~alpine/aports

5 2

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

Stefan Wagner
Details
Message ID
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de>
Sender timestamp
1460733763
DKIM signature
missing
Download raw message
Patch: +40 -0
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
@@ -0,0 +1,40 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=libftdi
+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"
+license="LGPL2, GPL2"
+depends="libusb"
+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
+}
+
+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"
-- 
2.8.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 2/5] testing/binutils-avr: new aport

Stefan Wagner
Details
Message ID
<1460733767-26639-2-git-send-email-stw@bit-strickerei.de>
In-Reply-To
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de> (view parent)
Sender timestamp
1460733764
DKIM signature
missing
Download raw message
Patch: +132 -0
Tools necessary to build programs for AVR targets
http://www.gnu.org/software/binutils/
---
 testing/binutils-avr/APKBUILD                      | 55 ++++++++++++++++++++++
 .../binutils-ld-fix-static-linking.patch           | 46 ++++++++++++++++++
 testing/binutils-avr/hash-style-gnu.patch          | 31 ++++++++++++
 3 files changed, 132 insertions(+)
 create mode 100644 testing/binutils-avr/APKBUILD
 create mode 100644 testing/binutils-avr/binutils-ld-fix-static-linking.patch
 create mode 100644 testing/binutils-avr/hash-style-gnu.patch

diff --git a/testing/binutils-avr/APKBUILD b/testing/binutils-avr/APKBUILD
new file mode 100644
index 0000000..9b84246
--- /dev/null
+++ b/testing/binutils-avr/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=binutils-avr
+pkgver=2.25.1
+pkgrel=0
+pkgdesc="Tools necessary to build programs for AVR targets"
+url="http://www.gnu.org/software/binutils/"
+depends=""
+makedepends="gettext libtool autoconf automake" # bison flex texinfo zlib-dev"
+arch="x86_64"
+license="GPL2 GPL3+ LGPL2 BSD"
+subpackages="$pkgname-doc"
+source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
+	binutils-ld-fix-static-linking.patch
+	hash-style-gnu.patch"
+
+builddir="$srcdir/binutils-$pkgver"
+_workingdir="$srcdir/binutils-build"
+
+build() {
+	mkdir "$_workingdir" || return 1
+	cd "$_workingdir"
+	"$builddir"/configure \
+		--build="$CBUILD" \
+		--target=avr \
+		--with-lib-path=/usr/lib \
+		--prefix=/usr \
+		--enable-ld=default \
+		--enable-gold=yes \
+		--enable-plugins \
+		--disable-multilib \
+		--disable-werror \
+		--disable-nls \
+		|| return 1
+	make -j1 tooldir=/usr
+}
+
+package() {
+	cd "$_workingdir"
+	make tooldir=/usr install DESTDIR="$pkgdir" || return 1
+	rm -rf "$pkgdir"/usr/share/info
+	for bin in ar as nm objcopy objdump ranlib strip readelf; do
+		rm -f "$pkgdir"/usr/bin/"$bin"
+	done
+}
+
+md5sums="ac493a78de4fee895961d025b7905be4  binutils-2.25.1.tar.bz2
+c9f308494b87c243f121a56d58f2da87  binutils-ld-fix-static-linking.patch
+686071a371b6d7aaad86c3a5c09ba6d3  hash-style-gnu.patch"
+sha256sums="b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22  binutils-2.25.1.tar.bz2
+d5c5581d0ba04ef2e3690f6fb57435bf7ce343f2376fe972a2a693c5429eec9c  binutils-ld-fix-static-linking.patch
+d30633153c41f0a59956f4d49ad12c0b53dabfd9f48175d0db0a1a5f2263cdfc  hash-style-gnu.patch"
+sha512sums="0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d  binutils-2.25.1.tar.bz2
+ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49  binutils-ld-fix-static-linking.patch
+24e853bf4b58621a77921087e599da2ace47ba3079e2d50fb5d08ae399be5f060c5fdd7f65257bcc0526aebc66e68b98aafd45d714c035da8ea2bdc3d8d4e375  hash-style-gnu.patch"
diff --git a/testing/binutils-avr/binutils-ld-fix-static-linking.patch b/testing/binutils-avr/binutils-ld-fix-static-linking.patch
new file mode 100644
index 0000000..bc5d762
--- /dev/null
+++ b/testing/binutils-avr/binutils-ld-fix-static-linking.patch
@@ -0,0 +1,46 @@
+This fixes static linking for our hardened toolchain
+diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
+index e8126cb..9532bfb 100644
+--- a/ld/scripttempl/elf.sc
+@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
+ if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
+   SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
+   SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
+-  CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
+-  DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
++  CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors"
++  DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors"
+ else
+   SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
+   SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
+@@ -270,15 +270,14 @@ CTOR=".ctors        ${CONSTRUCTING-0} :
+        doesn't matter which directory crtbegin.o
+        is in.  */
+ 
+-    KEEP (*crtbegin.o(.ctors))
+-    KEEP (*crtbegin?.o(.ctors))
++    KEEP (*crtbegin*.o(.ctors))
+ 
+     /* We don't want to include the .ctor section from
+        the crtend.o file until after the sorted ctors.
+        The .ctor section from the crtend file contains the
+        end of ctors marker and it must be last */
+ 
+-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
++    KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
+     KEEP (*(SORT(.ctors.*)))
+     KEEP (*(.ctors))
+     ${CONSTRUCTING+${CTOR_END}}
+@@ -286,9 +285,8 @@ CTOR=".ctors        ${CONSTRUCTING-0} :
+ DTOR=".dtors        ${CONSTRUCTING-0} :
+   {
+     ${CONSTRUCTING+${DTOR_START}}
+-    KEEP (*crtbegin.o(.dtors))
+-    KEEP (*crtbegin?.o(.dtors))
+-    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
++    KEEP (*crtbegin*.o(.dtors))
++    KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
+     KEEP (*(SORT(.dtors.*)))
+     KEEP (*(.dtors))
+     ${CONSTRUCTING+${DTOR_END}}
diff --git a/testing/binutils-avr/hash-style-gnu.patch b/testing/binutils-avr/hash-style-gnu.patch
new file mode 100644
index 0000000..2e6c019
--- /dev/null
+++ b/testing/binutils-avr/hash-style-gnu.patch
@@ -0,0 +1,31 @@
+# DP: Default to --hash-style=gnu in ld.bfd and ld.gold.
+
+--- a/ld/ldmain.c
+@@ -287,6 +288,15 @@
+   emulation = get_emulation (argc, argv);
+   ldemul_choose_mode (emulation);
+   default_target = ldemul_choose_target (argc, argv);
++
++  /* Default to --hash-style=gnu */
++  if (strcmp (default_target, "elf32-tradbigmips") != 0
++      && strcmp (default_target, "elf32-tradlittlemips") != 0)
++    {
++      link_info.emit_gnu_hash = TRUE;
++      link_info.emit_hash = FALSE;
++    }
++
+   config.maxpagesize = bfd_emul_get_maxpagesize (default_target);
+   config.commonpagesize = bfd_emul_get_commonpagesize (default_target);
+   lang_init ();
+--- a/gold/options.h
+@@ -794,7 +794,7 @@
+ 		N_("Min fraction of empty buckets in dynamic hash"),
+ 		N_("FRACTION"));
+ 
+-  DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "sysv",
++  DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "gnu",
+ 	      N_("Dynamic hash style"), N_("[sysv,gnu,both]"),
+ 	      {"sysv", "gnu", "both"});
+ 
-- 
2.8.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 3/5] testing/gcc-avr: new aport

Stefan Wagner
Details
Message ID
<1460733767-26639-3-git-send-email-stw@bit-strickerei.de>
In-Reply-To
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de> (view parent)
Sender timestamp
1460733765
DKIM signature
missing
Download raw message
Patch: +67 -0
The GNU Compiler Collection for AVR targets
http://gcc.gnu.org
---
 testing/gcc-avr/APKBUILD | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 testing/gcc-avr/APKBUILD

diff --git a/testing/gcc-avr/APKBUILD b/testing/gcc-avr/APKBUILD
new file mode 100644
index 0000000..f9cba40
--- /dev/null
+++ b/testing/gcc-avr/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=gcc-avr
+pkgver=5.3.0
+pkgrel=1
+pkgdesc="The GNU Compiler Collection for AVR targets"
+url="http://gcc.gnu.org"
+depends="binutils-avr"
+makedepends="bash linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev"
+arch="x86_64"
+license="GPL LGPL"
+subpackages="$pkgname-doc"
+_islver=0.15
+source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
+	http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2"
+
+builddir="$srcdir/gcc-$pkgver"
+_workingdir="$builddir/build"
+build() {
+	mkdir "$_workingdir" || return 1
+	cd "$_workingdir"
+
+	# link isl for in-tree build
+	ln -s "$srcdir"/isl-"$_islver" "$builddir"/isl
+
+	export CFLAGS_FOR_TARGET='-pipe'
+	export CXXFLAGS_FOR_TARGET='-pipe'
+
+	"$builddir"/configure \
+		--build="$CBUILD" \
+		--target=avr \
+		--prefix=/usr \
+		--enable-languages=c,c++ \
+		--enable-ld=default \
+		--enable-__cxa_atexit \
+		--disable-install-libiberty \
+		--disable-libssp \
+		--disable-libstdcxx-pch \
+		--disable-libunwind-exceptions \
+		--disable-linker-build-id \
+		--disable-nls \
+		--disable-werror \
+		--libdir=/usr/lib \
+		--libexecdir=/usr/lib \
+		--with-as=/usr/bin/avr-as \
+		--with-gnu-as \
+		--with-gnu-ld \
+		--with-ld=/usr/bin/avr-ld \
+		--with-system-zlib \
+		--with-isl || return 1
+	make
+}
+
+package() {
+	cd "$_workingdir"
+	make install DESTDIR="$pkgdir" || return 1
+	rm -rf "$pkgdir"/usr/share/man/man7
+	rm -f "$pkgdir"/usr/lib/libcc1.*
+	find "$pkgdir"/usr/lib -type f -name "*.a" -exec /usr/bin/avr-strip --strip-debug '{}' \;
+}
+
+md5sums="c9616fd448f980259c31de613e575719  gcc-5.3.0.tar.bz2
+8428efbbc6f6e2810ce5c1ba73ecf98c  isl-0.15.tar.bz2"
+sha256sums="b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db  gcc-5.3.0.tar.bz2
+8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b  isl-0.15.tar.bz2"
+sha512sums="d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a  gcc-5.3.0.tar.bz2
+1e27b7798f7428abcb5e9b2e3fbe3842fede54c03bbd7bd3cf83703e1e4cca7d95c51326ab90253fe55b38c002183e8e78dfbb4d2cf20b0aabe02443c8e7d50f  isl-0.15.tar.bz2"
-- 
2.8.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 4/5] testing/avr-libc: new aport

Stefan Wagner
Details
Message ID
<1460733767-26639-4-git-send-email-stw@bit-strickerei.de>
In-Reply-To
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de> (view parent)
Sender timestamp
1460733766
DKIM signature
missing
Download raw message
Patch: +37 -0
The C runtime library for the AVR family of microcontrollers
http://savannah.nongnu.org/projects/avr-libc/
---
 testing/avr-libc/APKBUILD | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 testing/avr-libc/APKBUILD

diff --git a/testing/avr-libc/APKBUILD b/testing/avr-libc/APKBUILD
new file mode 100644
index 0000000..8328ca9
--- /dev/null
+++ b/testing/avr-libc/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=avr-libc
+pkgver=2.0.0
+pkgrel=0
+pkgdesc="The C runtime library for the AVR family of microcontrollers"
+url="http://savannah.nongnu.org/projects/avr-libc/"
+depends="gcc-avr"
+makedepends="autoconf automake bash"
+arch="x86_64"
+license="BSD"
+subpackages="$pkgname-doc"
+source="http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.bz2"
+
+builddir="$srcdir/$pkgname-$pkgver"
+build() {
+	cd "$builddir"
+	./bootstrap || return 1
+	CC=avr-gcc ./configure \
+		--build="$(./config.guess)" \
+		--host=avr \
+		--prefix=/usr || return 1
+	make || return 1
+}
+
+package() {
+	cd "$builddir"
+	make install DESTDIR="$pkgdir" || return 1
+	if [ -d "$pkgdir"/usr/lib64 ]; then
+		mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
+		rmdir "$pkgdir"/usr/lib64
+	fi
+}
+
+md5sums="2360981cd5d94e1d7a70dfc6983bdf15  avr-libc-2.0.0.tar.bz2"
+sha256sums="b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97  avr-libc-2.0.0.tar.bz2"
+sha512sums="fc8d062043d633350dbe05978935dcb8028257a4f1013f246af9658aef0671def19ac11577d1ee9302df68df1b8cf030b22441d96852e185db212263aacabea6  avr-libc-2.0.0.tar.bz2"
-- 
2.8.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 5/5] testing/avrdude: new aport

Stefan Wagner
Details
Message ID
<1460733767-26639-5-git-send-email-stw@bit-strickerei.de>
In-Reply-To
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de> (view parent)
Sender timestamp
1460733767
DKIM signature
missing
Download raw message
Patch: +33 -0
Download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers
http://www.nongnu.org/avrdude/
---
 testing/avrdude/APKBUILD | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 testing/avrdude/APKBUILD

diff --git a/testing/avrdude/APKBUILD b/testing/avrdude/APKBUILD
new file mode 100644
index 0000000..9cd3696
--- /dev/null
+++ b/testing/avrdude/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=avrdude
+pkgver=6.3
+pkgrel=0
+pkgdesc="Download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers"
+url="http://www.nongnu.org/avrdude/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="linux-headers bash flex byacc libftdi-dev libusb-compat-dev libelf-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.savannah.gnu.org/releases/avrdude/${pkgname}-${pkgver}.tar.gz"
+
+builddir="$srcdir/${pkgname}-${pkgver}"
+build() {
+	cd "$builddir"
+	./configure \
+		--mandir=/usr/share/man \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--enable-linuxgpio || return 1
+	make
+}
+
+package() {
+	cd "$builddir"
+	make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="58bb42049122cf80fe4f4d0ce36d92ee  avrdude-6.3.tar.gz"
+sha256sums="0f9f731b6394ca7795b88359689a7fa1fba818c6e1d962513eb28da670e0a196  avrdude-6.3.tar.gz"
+sha512sums="b671008388d6a552e71066fec46429bc7f6639e8eac41113bcbba5a56212b78be31fcf04956b31e11c6b14888b0f6e825f7458395b9ff4fc28406074c7ded2b2  avrdude-6.3.tar.gz"
-- 
2.8.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20160516172601.2ac6798f@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1460733767-26639-1-git-send-email-stw@bit-strickerei.de> (view parent)
Sender timestamp
1463412361
DKIM signature
missing
Download raw message
Sorry for late response.

On Fri, 15 Apr 2016 17:22:43 +0200
Stefan Wagner <stw@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
> @@ -0,0 +1,40 @@
> +# Contributor: Stefan Wagner <stw@bit-strickerei.de>
> +# Maintainer: Stefan Wagner <stw@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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---