wok annotate ussp-push/receipt @ rev 25591
enet: update wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 22 11:01:59 2023 +0000 (14 months ago) |
parents | 934055de50e2 |
children | b81ceff0b056 |
rev | line source |
---|---|
pascal@19908 | 1 # SliTaz package receipt. |
pascal@19908 | 2 |
pascal@19908 | 3 PACKAGE="ussp-push" |
pascal@19908 | 4 VERSION="0.11" |
pascal@19908 | 5 CATEGORY="system-tools" |
pascal@19908 | 6 SHORT_DESC="a OBEX object pusher." |
pascal@19908 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@19908 | 8 LICENSE="GPL2" |
pascal@19908 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@25362 | 10 WEB_SITE="https://web.archive.org/web/20210308071831/http://xmailserver.org/ussp-push.html" |
pascal@25362 | 11 WGET_URL="https://web.archive.org/web/20210114184133if_/http://www.xmailserver.org/$TARBALL" |
pascal@19908 | 12 TAGS="bluetooth" |
pascal@19908 | 13 |
pascal@19908 | 14 DEPENDS="bluez openobex" |
pascal@19908 | 15 BUILD_DEPENDS="bluez-dev openobex-dev" |
pascal@19908 | 16 |
pascal@24462 | 17 # What is the latest version available today? |
pascal@24462 | 18 current_version() |
pascal@24462 | 19 { |
pascal@25362 | 20 wget -O - http://xmailserver.org/ussp-push.html 2>/dev/null | \ |
pascal@24462 | 21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24462 | 22 } |
pascal@24462 | 23 |
pascal@19908 | 24 # Rules to configure and make the package. |
pascal@19908 | 25 compile_rules() |
pascal@19908 | 26 { |
pascal@19908 | 27 sed -i -e 's/OBEX_TRANS_CUST/OBEX_TRANS_CUSTOM/' \ |
pascal@19908 | 28 -e '/^int bt_debug;$/r/dev/stdin' src/obex_main.c <<EOT |
pascal@19908 | 29 |
pascal@19908 | 30 static int OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size) |
pascal@19908 | 31 { |
pascal@19908 | 32 int len, n; |
pascal@19908 | 33 |
pascal@19908 | 34 if (uc == NULL || c == NULL) |
pascal@19908 | 35 return -1; |
pascal@19908 | 36 |
pascal@19908 | 37 len = n = strlen((char *) c); |
pascal@19908 | 38 if (n*2+2 > size) |
pascal@19908 | 39 return -1; |
pascal@19908 | 40 |
pascal@19908 | 41 uc[n*2+1] = uc[n*2] = 0; |
pascal@19908 | 42 while (n--) { |
pascal@19908 | 43 uc[n*2+1] = c[n]; |
pascal@19908 | 44 uc[n*2] = 0; |
pascal@19908 | 45 } |
pascal@19908 | 46 |
pascal@19908 | 47 return (len * 2) + 2; |
pascal@19908 | 48 } |
pascal@19908 | 49 EOT |
pascal@19908 | 50 sed -i 's/hci_remote_name/hci_read_remote_name/' src/obex_socket.c |
pascal@19909 | 51 ./configure --prefix=/usr \ |
pascal@19909 | 52 $CONFIGURE_ARGS && |
pascal@19908 | 53 make && |
pascal@19908 | 54 make DESTDIR=$DESTDIR install |
pascal@19908 | 55 } |
pascal@19908 | 56 |
pascal@19908 | 57 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19908 | 58 genpkg_rules() |
pascal@19908 | 59 { |
pascal@19910 | 60 mkdir -p $install/usr/share/doc $fs/usr |
pascal@19909 | 61 cp -a $src/doc/ussp-push.html $install/usr/share/doc |
pascal@19909 | 62 cp -a $src/README $install/usr/share/doc |
pascal@19908 | 63 cp -a $install/usr/bin $fs/usr |
pascal@19908 | 64 } |
pascal@19908 | 65 |