wok annotate uhd/receipt @ rev 24055
Add current_version for most github hosted softwares
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 08 08:46:05 2021 +0000 (2021-06-08) |
parents | 002dece9cd28 |
children | fbe88431f963 |
rev | line source |
---|---|
pascal@19213 | 1 # SliTaz package receipt. |
pascal@19213 | 2 |
pascal@19213 | 3 PACKAGE="uhd" |
pascal@19213 | 4 VERSION="release_003_009_003" |
pascal@19213 | 5 CATEGORY="network" |
pascal@19213 | 6 SHORT_DESC="The USRP(tm) Hardware Driver." |
pascal@19213 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@19213 | 8 LICENSE="GPL2" |
pascal@19213 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@19213 | 10 WEB_SITE="https://github.com/EttusResearch/uhd" |
pascal@19213 | 11 WGET_URL="$WEB_SITE/archive/$VERSION.tar.gz" |
pascal@19213 | 12 |
pascal@19213 | 13 DEPENDS="libboost-date-time libboost-filesystem libboost-program-options \ |
pascal@19213 | 14 libboost-regex libboost-system libboost-test libboost-serialization \ |
pascal@19676 | 15 libboost-thread libboost-tr1 udev python" |
pascal@19213 | 16 BUILD_DEPENDS="wget cmake python python-mako libboost-date-time-dev \ |
pascal@19213 | 17 libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev \ |
pascal@19213 | 18 libboost-system-dev libboost-test-dev libboost-serialization-dev \ |
pascal@19213 | 19 libboost-thread-dev libboost-tr1-dev libusb-dev udev-dev" |
pascal@19213 | 20 |
pascal@24055 | 21 current_version() |
pascal@24055 | 22 { |
pascal@24055 | 23 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 24 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q' |
pascal@24055 | 25 } |
pascal@24055 | 26 |
pascal@19213 | 27 # Rules to configure and make the package. |
pascal@19213 | 28 compile_rules() |
pascal@19213 | 29 { |
pascal@21386 | 30 sed -i 's|native(|native_handle(|' host/lib/transport/*.cpp \ |
pascal@21386 | 31 host/examples/*.cpp |
pascal@21386 | 32 sed -i 's|timeout \* 1000.0|long(&)|' host/lib/usrp/x300/x300_impl.cpp |
pascal@21386 | 33 sed -i 's|\(milliseconds\)\(.*\);|\1(long\2);|' \ |
pascal@21386 | 34 host/examples/tx_samples_from_file.cpp |
pascal@21386 | 35 sed -i 's|\(:seconds\)\(.*\))|\1(long\2))|' \ |
pascal@21386 | 36 host/examples/rx_samples_to_file.cpp |
pascal@19708 | 37 export LDFLAGS="$LDFLAGS -ltinfo" |
pascal@19213 | 38 cd $src/host |
pascal@19213 | 39 mkdir build |
pascal@19213 | 40 cd build |
pascal@19213 | 41 cmake .. -DENABLE_MANUAL=OFF -DENABLE_DOXYGEN=OFF \ |
pascal@19213 | 42 -DENABLE_MAN_PAGES=OFF -DENABLE_B200=ON -DENABLE_USB=ON \ |
pascal@19213 | 43 -DCMAKE_INSTALL_PREFIX=/usr |
pascal@19213 | 44 make && make DESTDIR=$DESTDIR install |
pascal@19213 | 45 } |
pascal@19213 | 46 |
pascal@19213 | 47 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19213 | 48 genpkg_rules() |
pascal@19213 | 49 { |
pascal@19213 | 50 mkdir -p $fs/usr/lib |
pascal@19213 | 51 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pascal@19213 | 52 cp -a $install/usr/lib/uhd $fs/usr/lib |
pascal@19213 | 53 cp -a $install/usr/bin $fs/usr |
pascal@19213 | 54 cp -a $install/usr/share $fs/usr |
pascal@19213 | 55 } |