wok rev 14712
Add libnl1
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 11 09:04:29 2013 +0200 (2013-06-11) |
parents | 91aaa33157f6 |
children | e347aa94555a |
files | fusecloop/stuff/fusecloop.u libnl1-dev/receipt libnl1/receipt |
line diff
1.1 --- a/fusecloop/stuff/fusecloop.u Sun Jun 09 16:52:49 2013 +0200 1.2 +++ b/fusecloop/stuff/fusecloop.u Tue Jun 11 09:04:29 2013 +0200 1.3 @@ -165,7 +165,7 @@ 1.4 exit(1); 1.5 } 1.6 1.7 -@@ -24,44 +28,91 @@ 1.8 +@@ -24,44 +28,99 @@ 1.9 exit(1); 1.10 } 1.11 1.12 @@ -226,13 +226,15 @@ 1.13 + fprintf(stderr, "Index %s.\n", build_index(offsets, num_blocks)); 1.14 + 1.15 + if (argc > 2) { 1.16 ++ unsigned n; 1.17 + loff_t data, offset = ((num_blocks + 1) * sizeof(offset)) + sizeof(head); 1.18 + 1.19 + strcpy(head.preamble, CLOOP_PREAMBLE); 1.20 -+ write(STDOUT_FILENO, &head, sizeof(head)); 1.21 ++ write(STDOUT_FILENO, &head, n = sizeof(head)); 1.22 + for (i = 0; i < num_blocks; i++) { 1.23 + data = __be64_to_cpu(offset); 1.24 + write(STDOUT_FILENO, &data, sizeof(data)); 1.25 ++ n += sizeof(data); 1.26 + offset += offsets[i].size; 1.27 + } 1.28 + data = __be64_to_cpu(offset); 1.29 @@ -240,6 +242,12 @@ 1.30 + for (i = 0; i < num_blocks && lseek64(handle, offsets[i].offset, SEEK_SET) >= 0; i++) { 1.31 + read(handle, buffer, offsets[i].size); 1.32 + write(STDOUT_FILENO, buffer, offsets[i].size); 1.33 ++ n += offsets[i].size; 1.34 ++ } 1.35 ++ n &= 0x1FF; 1.36 ++ if (n) { 1.37 ++ memset(buffer, 0, 512); 1.38 ++ write(STDOUT_FILENO, buffer, 512 - n); 1.39 + } 1.40 + return 0; 1.41 + } 1.42 @@ -283,7 +291,7 @@ 1.43 if (i == 3) { 1.44 fprintf(stderr, 1.45 "Block head:%02X%02X%02X%02X%02X%02X%02X%02X\n", 1.46 -@@ -105,12 +156,12 @@ 1.47 +@@ -105,12 +164,12 @@ 1.48 fprintf(stderr, "Uncomp: unknown error %u\n", i); 1.49 exit(1); 1.50 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/libnl1-dev/receipt Tue Jun 11 09:04:29 2013 +0200 2.3 @@ -0,0 +1,18 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="libnl1-dev" 2.7 +VERSION="1.1.4" 2.8 +CATEGORY="network" 2.9 +SHORT_DESC="netlink library devel files." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +WEB_SITE="http://people.suug.ch/~tgr/libnl" 2.12 +WANTED="libnl1" 2.13 +DEPENDS="libnl1" 2.14 + 2.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.16 +genpkg_rules() 2.17 +{ 2.18 + mkdir -p $fs/usr 2.19 + cp -a $install/usr/include $fs/usr 2.20 +} 2.21 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/libnl1/receipt Tue Jun 11 09:04:29 2013 +0200 3.3 @@ -0,0 +1,27 @@ 3.4 +# SliTaz package receipt. 3.5 + 3.6 +PACKAGE="libnl1" 3.7 +VERSION="1.1.4" 3.8 +SOURCE="libnl" 3.9 +CATEGORY="network" 3.10 +SHORT_DESC="netlink library." 3.11 +MAINTAINER="pascal.bellard@slitaz.org" 3.12 +TARBALL="$SOURCE-$VERSION.tar.gz" 3.13 +WEB_SITE="http://people.suug.ch/~tgr/libnl" 3.14 +WGET_URL="$WEB_SITE/files/$TARBALL" 3.15 + 3.16 +BUILD_DEPENDS="flex" 3.17 + 3.18 +# Rules to configure and make the package. 3.19 +compile_rules() 3.20 +{ 3.21 + cd $src 3.22 + ./configure && make && make install 3.23 +} 3.24 + 3.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 3.26 +genpkg_rules() 3.27 +{ 3.28 + mkdir -p $fs/usr 3.29 + cp -a $install/usr/lib $fs/usr 3.30 +}