1 # Maintainer: Dan Serban
6 pkgdesc="libbamf-dev and libbamf0 from archive.ubuntu.com"
8 url=https://launchpad.net/bamf
11 _filearch=i386 && _soarch=i386
12 [ "$CARCH" = "x86_64" ] && _filearch=amd64 && _soarch=x86_64
16 lynx -dump "http://archive.ubuntu.com/ubuntu/pool/main/b/bamf/" | grep -o http.*deb > tmp.txt
20 rm libbamf-dev_*.deb 2>/dev/null || true
21 _url=$(grep /libbamf-dev_0.*${_filearch}.deb tmp.txt | tail -1)
23 rm data.tar.gz 2>/dev/null || true
24 bsdtar -xf $(basename ${_url}) data.tar.gz
25 bsdtar -xf data.tar.gz -C "${pkgdir}" || true
26 cd "${pkgdir}"/usr/lib
27 mv ${_soarch}-linux-gnu/pkgconfig .
28 rm -r ${_soarch}-linux-gnu
29 cd "${pkgdir}"/usr/include/libbamf
35 rm libbamf0_*.deb 2>/dev/null || true
36 _url=$(grep /libbamf0_0.*${_filearch}.deb tmp.txt | tail -1)
38 rm data.tar.gz 2>/dev/null || true
39 bsdtar -xf $(basename ${_url}) data.tar.gz
40 rm -r usr 2>/dev/null || true
41 bsdtar -xf data.tar.gz || true
42 install -Dm755 $(find usr/lib -type f) "${pkgdir}"/usr/lib/libbamf.so.0.0.0
43 cd "${pkgdir}"/usr/lib
44 ln -s libbamf.so.0.0.0 libbamf.so.0
45 ln -s libbamf.so.0.0.0 libbamf.so