wok annotate ussp-push/receipt @ rev 19908
add ussp-push
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 13 09:13:02 2017 +0200 (2017-04-13) |
parents | |
children | 709cc39a8b9f |
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@19908 | 10 WEB_SITE="http://xmailserver.org/ussp-push.html" |
pascal@19908 | 11 WGET_URL="http://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@19908 | 17 # Rules to configure and make the package. |
pascal@19908 | 18 compile_rules() |
pascal@19908 | 19 { |
pascal@19908 | 20 sed -i -e 's/OBEX_TRANS_CUST/OBEX_TRANS_CUSTOM/' \ |
pascal@19908 | 21 -e '/^int bt_debug;$/r/dev/stdin' src/obex_main.c <<EOT |
pascal@19908 | 22 |
pascal@19908 | 23 static int OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size) |
pascal@19908 | 24 { |
pascal@19908 | 25 int len, n; |
pascal@19908 | 26 |
pascal@19908 | 27 if (uc == NULL || c == NULL) |
pascal@19908 | 28 return -1; |
pascal@19908 | 29 |
pascal@19908 | 30 len = n = strlen((char *) c); |
pascal@19908 | 31 if (n*2+2 > size) |
pascal@19908 | 32 return -1; |
pascal@19908 | 33 |
pascal@19908 | 34 uc[n*2+1] = uc[n*2] = 0; |
pascal@19908 | 35 while (n--) { |
pascal@19908 | 36 uc[n*2+1] = c[n]; |
pascal@19908 | 37 uc[n*2] = 0; |
pascal@19908 | 38 } |
pascal@19908 | 39 |
pascal@19908 | 40 return (len * 2) + 2; |
pascal@19908 | 41 } |
pascal@19908 | 42 EOT |
pascal@19908 | 43 sed -i 's/hci_remote_name/hci_read_remote_name/' src/obex_socket.c |
pascal@19908 | 44 ./configure --prefix=/usr --infodir=/usr/share/info \ |
pascal@19908 | 45 --mandir=/usr/share/man \ |
pascal@19908 | 46 $CONFIGURE_ARGS && |
pascal@19908 | 47 make && |
pascal@19908 | 48 make DESTDIR=$DESTDIR install |
pascal@19908 | 49 } |
pascal@19908 | 50 |
pascal@19908 | 51 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19908 | 52 genpkg_rules() |
pascal@19908 | 53 { |
pascal@19908 | 54 mkdir -p $fs/usr/share/doc |
pascal@19908 | 55 cp -a $src/doc/ussp-push.html $fs/usr/share/doc |
pascal@19908 | 56 cp -a $src/README $fs/usr/share/doc |
pascal@19908 | 57 cp -a $install/usr/bin $fs/usr |
pascal@19908 | 58 } |
pascal@19908 | 59 |