wok-current annotate usb-modeswitch/receipt @ rev 25308
updated sipsak (0.9.7 -> 0.9.8.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jul 20 10:59:52 2022 +0100 (2022-07-20) |
parents | 2a0479881723 |
children | d8b4173b1d25 |
rev | line source |
---|---|
pankso@12080 | 1 # SliTaz package receipt. |
pankso@12080 | 2 |
pankso@12080 | 3 PACKAGE="usb-modeswitch" |
Hans-G?nter@22086 | 4 VERSION="2.5.2" |
Hans-G?nter@22086 | 5 PACKAGE_DATA="${PACKAGE}-data-20170806" |
pankso@12080 | 6 CATEGORY="system-tools" |
Hans-G?nter@22086 | 7 TAGS="3g-modem" |
pankso@12080 | 8 SHORT_DESC="Handling Mode-Switching USB Devices on Linux." |
pankso@12080 | 9 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 10 LICENSE="GPL2" |
pascal@22632 | 11 WEB_SITE="https://www.draisberghof.de/usb_modeswitch/" |
Hans-G?nter@22086 | 12 |
pankso@12080 | 13 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@14353 | 14 EXTRA_SOURCE_FILES="$PACKAGE_DATA.tar.bz2 usb_modeswitch.setup" |
pascal@24974 | 15 WGET_URL="https://www.draisberghof.de/usb_modeswitch/$TARBALL" |
pankso@12080 | 16 |
mojo@19524 | 17 DEPENDS="libusb" |
mojo@19524 | 18 BUILD_DEPENDS="libusb-dev" |
pankso@12080 | 19 |
pascal@24436 | 20 # What is the latest version available today? |
pascal@24436 | 21 current_version() |
pascal@24436 | 22 { |
pascal@24436 | 23 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24436 | 24 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q |
pascal@24436 | 25 } |
pascal@24436 | 26 |
pankso@12080 | 27 # Rules to configure and make the package. |
pankso@12080 | 28 compile_rules() |
pankso@12080 | 29 { |
Hans-G?nter@22086 | 30 mkdir -p $DESTDIR/etc |
Hans-G?nter@22086 | 31 mkdir -p $DESTDIR/lib/udev/usb_modeswitch |
Hans-G?nter@22086 | 32 mkdir -p $DESTDIR/usr/share/man/man1 |
Hans-G?nter@22086 | 33 |
Hans-G?nter@22086 | 34 make && |
Hans-G?nter@22086 | 35 make install-static |
pascal@13249 | 36 |
pascal@13249 | 37 # download data |
pascal@13249 | 38 [ -s $SOURCES_REPOSITORY/$PACKAGE_DATA.tar.bz2 ] || |
pascal@13249 | 39 wget -P $SOURCES_REPOSITORY $WEB_SITE/$PACKAGE_DATA.tar.bz2 |
pascal@13249 | 40 [ -d $PACKAGE_DATA ] || |
pascal@13249 | 41 tar -xjf $SOURCES_REPOSITORY/$PACKAGE_DATA.tar.bz2 |
pascal@13249 | 42 |
pascal@13249 | 43 # download setup config |
pascal@13249 | 44 [ -s $SOURCES_REPOSITORY/usb_modeswitch.setup ] || |
pascal@13249 | 45 wget -O $SOURCES_REPOSITORY/usb_modeswitch.setup \ |
pascal@13249 | 46 $WEB_SITE/device_reference.txt |
pankso@12080 | 47 } |
pankso@12080 | 48 |
pankso@12080 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@12080 | 50 genpkg_rules() |
pankso@12080 | 51 { |
Hans-G?nter@22086 | 52 mkdir -p $fs/usr |
Hans-G?nter@22086 | 53 mkdir -p $fs/etc/usb_modeswitch.d |
Hans-G?nter@22086 | 54 mkdir -p $fs/lib/udev/rules.d |
Hans-G?nter@22086 | 55 |
Hans-G?nter@22086 | 56 cp -a $install/etc $fs |
Hans-G?nter@22086 | 57 cp -a $install/lib $fs |
Hans-G?nter@22086 | 58 cp -a $install/var $fs |
Hans-G?nter@22086 | 59 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@22086 | 60 cp -a $src/$PACKAGE_DATA/usb_modeswitch.d/* $fs/etc/usb_modeswitch.d |
pascal@13249 | 61 cp -a $src/$PACKAGE_DATA/40-usb_modeswitch.rules $fs/lib/udev/rules.d |
Hans-G?nter@22086 | 62 cp -a $SOURCES_REPOSITORY/usb_modeswitch.setup $fs/etc/ |
pascal@13251 | 63 chown -R root.root $fs |
pankso@12080 | 64 } |