summaryrefslogtreecommitdiffstats
path: root/abs/extra
diff options
context:
space:
mode:
authorMichael Hanson <mihanson@linhes.org>2012-04-14 05:13:05 (GMT)
committerMichael Hanson <mihanson@linhes.org>2012-04-14 05:13:05 (GMT)
commit5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43 (patch)
treeacde2ddc972337f648a826f3d961dcb8bebf892a /abs/extra
parent8e721470713e6a5a164f1d7682b0d248cb87b03c (diff)
parent502a19b42d9df3fb3c3e521a37eebd20f9fbd984 (diff)
downloadlinhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.zip
linhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.tar.gz
linhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.tar.bz2
Merge branch 'testing' of linhes.org:linhes_pkgbuild into testing
Conflicts: abs/extra/bluez/PKGBUILD abs/extra/bluez/__changelog
Diffstat (limited to 'abs/extra')
-rw-r--r--abs/extra/bluez/PKGBUILD78
-rw-r--r--abs/extra/bluez/__changelog14
-rw-r--r--abs/extra/bluez/bluetooth.conf.d5
-rw-r--r--abs/extra/community/afpfs-ng/01-gcrypt.patch26
-rw-r--r--abs/extra/community/afpfs-ng/02-pointer.patch280
-rw-r--r--abs/extra/community/afpfs-ng/10-fix-errno.patch23
-rw-r--r--abs/extra/community/afpfs-ng/20-build-error-fixes.patch125
-rw-r--r--abs/extra/community/afpfs-ng/21-header-path-fix.patch16
-rw-r--r--abs/extra/community/afpfs-ng/30-include-fixes.patch44
-rw-r--r--abs/extra/community/afpfs-ng/PKGBUILD66
-rw-r--r--abs/extra/community/afpfs-ng/fix_afpfs-ng_includes.patch3082
-rw-r--r--abs/extra/community/flashplugin/PKGBUILD10
-rw-r--r--abs/extra/community/libcec/PKGBUILD30
-rw-r--r--abs/extra/community/libnfs/PKGBUILD30
-rw-r--r--abs/extra/community/libshairport/PKGBUILD33
-rw-r--r--abs/extra/community/yajl/PKGBUILD33
-rw-r--r--abs/extra/crystalhd-git/PKGBUILD28
-rw-r--r--abs/extra/fontforge/PKGBUILD40
-rw-r--r--abs/extra/huludesktop/PKGBUILD4
-rw-r--r--abs/extra/huludesktop/huludesktop2
-rw-r--r--abs/extra/libcrystalhd-git/PKGBUILD2
-rw-r--r--abs/extra/libimobiledevice/PKGBUILD33
-rw-r--r--abs/extra/libimobiledevice/swig-version-check.patch14
-rw-r--r--abs/extra/libplist/PKGBUILD30
-rw-r--r--abs/extra/libspiro/PKGBUILD25
-rw-r--r--abs/extra/rtmpdump/PKGBUILD39
-rw-r--r--abs/extra/ttf-droid/PKGBUILD22
-rw-r--r--abs/extra/ttf-droid/ttf-droid.install15
-rw-r--r--abs/extra/ttf-liberation/PKGBUILD31
-rw-r--r--abs/extra/ttf-liberation/ttf.install16
-rw-r--r--abs/extra/upower/PKGBUILD27
-rw-r--r--abs/extra/usbmuxd/PKGBUILD35
-rw-r--r--abs/extra/usbmuxd/__changelog1
-rw-r--r--abs/extra/usbmuxd/usbmuxd-describe.patch20
-rw-r--r--abs/extra/usbmuxd/usbmuxd-udevuser.patch12
-rw-r--r--abs/extra/usbmuxd/usbmuxd.install19
-rw-r--r--abs/extra/xbmc/PKGBUILD124
-rw-r--r--abs/extra/xbmc/xbmc.install4
-rw-r--r--abs/extra/xbmc/xbmc.sh7
-rw-r--r--abs/extra/xbmc/xbmc11.patch15
40 files changed, 4256 insertions, 204 deletions
diff --git a/abs/extra/bluez/PKGBUILD b/abs/extra/bluez/PKGBUILD
deleted file mode 100644
index bfc7e25..0000000
--- a/abs/extra/bluez/PKGBUILD
+++ /dev/null
@@ -1,78 +0,0 @@
-# Maintainer: Geoffroy Carrier <geoffroy@archlinux.org>
-pkgname=bluez
-pkgver=4.99
-pkgrel=3
-pkgdesc="Libraries and tools for the Bluetooth protocol stack"
-url="http://www.bluez.org/"
-arch=('i686' 'x86_64')
-license=('GPL2')
-depends=('dbus-core')
-makedepends=('gstreamer0.10-base' 'libusb-compat' 'libnl' 'libsndfile')
-optdepends=("gstreamer0.10-base: bluetooth GStreamer support"
- "alsa-lib: Audio bluetooth devices support"
- "dbus-python: to run bluez-simple-agent"
- "pygobject: to run bluez-simple-agent"
- "libusb-compat: USB adapters support"
- "libnl: netlink plugin")
-conflicts=('bluez-libs' 'bluez-utils')
-provides=('bluez-libs' 'bluez-utils')
-replaces=('bluez-libs' 'bluez-utils')
-options=('!libtool')
-backup=(etc/bluetooth/{main,rfcomm,audio,network,input,serial}.conf
- 'etc/conf.d/bluetooth' 'etc/dbus-1/system.d/bluetooth.conf')
-install='bluez.install'
-source=("http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2"
- 'bluez-4.98_audio-streaming.patch'
- 'bluetooth.conf.d')
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # Add directive that allows audio streaming out-of-the-box
- patch -Np1 -i ${srcdir}/bluez-4.98_audio-streaming.patch || return 1
-
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --libexecdir=/lib \
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-tools \
- --enable-bccmd \
- --enable-dfutool \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --enable-wiimote \
- --disable-test \
- --disable-cups || return 1
-
- make || return 1
-}
-
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install || return 1
-
- install -d ${pkgdir}/etc/bluetooth
- install -m644 network/network.conf \
- input/input.conf \
- audio/audio.conf \
- serial/serial.conf \
- ${pkgdir}/etc/bluetooth/
-
- install -D -m644 "$srcdir/bluetooth.conf.d" \
- "$pkgdir/etc/conf.d/bluetooth" || return 1
-
- install -Dm755 test/simple-agent ${pkgdir}/usr/bin/bluez-simple-agent
- install -Dm755 test/test-device "${pkgdir}"/usr/bin/bluez-test-device
- install -Dm755 test/test-input "${pkgdir}"/usr/bin/bluez-test-input
- sed -i 's#/usr/bin/python#/usr/bin/python2#' \
- ${pkgdir}/usr/bin/bluez-simple-agent \
- ${pkgdir}/usr/bin/bluez-test-device \
- ${pkgdir}/usr/bin/bluez-test-input
-}
-md5sums=('2387053eb5a7b02f37df4871df022a02'
- 'da4ec22ee1a5c3e84d5d934440167526'
- 'd12be5b494525bb1ba6eac5c3983dd3e')
diff --git a/abs/extra/bluez/__changelog b/abs/extra/bluez/__changelog
deleted file mode 100644
index 7627514..0000000
--- a/abs/extra/bluez/__changelog
+++ /dev/null
@@ -1,14 +0,0 @@
-# by mihanson
-I really have no idea how this bluetooth stuff works. If anyone wants to
-take a stab at getting this working properly with runit, feel free. I
-only need this package to get mythpywii working.
-
-2010-04-01:
-Make this package work with runit. All daemons were seperated into their
-own run scripts. Of particular interest is rfcomm and hid2hci utilities.
-They are not daemons and I added "/sbin/sv <executable> down ." in their
-respective run files. All based on this thread:
-http://article.gmane.org/gmane.comp.sysutils.supervision.general/1585/
-
-2012-04-13
-disable cups
diff --git a/abs/extra/bluez/bluetooth.conf.d b/abs/extra/bluez/bluetooth.conf.d
index 8f25ef4..1c1e025 100644
--- a/abs/extra/bluez/bluetooth.conf.d
+++ b/abs/extra/bluez/bluetooth.conf.d
@@ -5,9 +5,6 @@
# Run the bluetoothd daemon (default: true)
#DAEMON_ENABLE="false"
-# Run hid2hci (default: false)
-#HID2HCI_ENABLE="true"
-
# Run the sdp daemon (default: false)
# If this is disabled, hcid's internal sdp daemon will be used
#SDPD_ENABLE="true"
@@ -28,6 +25,6 @@
#RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
# Options for hidd, dund and pand (default: none)
-#HIDD_OPTIONS=""
+HIDD_OPTIONS="--server"
#DUND_OPTIONS=""
#PAND_OPTIONS=""
diff --git a/abs/extra/community/afpfs-ng/01-gcrypt.patch b/abs/extra/community/afpfs-ng/01-gcrypt.patch
new file mode 100644
index 0000000..7bcace2
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/01-gcrypt.patch
@@ -0,0 +1,26 @@
+diff -ru afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1+iPhone/configure.ac
+--- afpfs-ng-0.8.1/configure.ac 2008-03-08 16:23:12.000000000 +0000
++++ afpfs-ng-0.8.1+iPhone/configure.ac 2010-10-24 05:26:15.000000000 +0000
+@@ -50,21 +50,6 @@
+ case $host in
+ *-*-darwin*)
+ AC_MSG_CHECKING([for correct gcrypt version])
+- AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM([
+- #include <gcrypt.h>
+- #include <stdio.h>],[
+- char*p= GCRYPT_VERSION;
+- unsigned int vers;
+- vers=atoi(p)*10000;
+- p=strchr(p,'.')+1;
+- vers+=atoi(p)*100;
+- p=strchr(p,'.')+1;
+- vers+=atoi(p);
+- if (vers<10400) return 1;
+- ])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR([version is < 1.4.0])])
+ AM_CONDITIONAL(HAVE_LIBGCRYPT, true)
+ AC_DEFINE([HAVE_LIBGCRYPT], [1] )
+ ;;
+
diff --git a/abs/extra/community/afpfs-ng/02-pointer.patch b/abs/extra/community/afpfs-ng/02-pointer.patch
new file mode 100644
index 0000000..80507b5
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/02-pointer.patch
@@ -0,0 +1,280 @@
+diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c
+--- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200
++++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <pthread.h>
+
+diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c
+--- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100
++++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200
+@@ -61,8 +61,9 @@ static int start_afpfsd(void)
+ snprintf(filename, PATH_MAX,
+ "/usr/local/bin/%s",AFPFSD_FILENAME);
+ if (access(filename,X_OK)) {
+- snprintf(filename, "/usr/bin/%s",
++ snprintf(filename, sizeof(filename), "/usr/bin/%s",
+ AFPFSD_FILENAME);
++ filename[sizeof(filename) - 1] = 0;
+ if (access(filename,X_OK)) {
+ printf("Could not find server (%s)\n",
+ filename);
+diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c
+--- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100
++++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200
+@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s
+ ret = ml_open(volume,path,flags,&fp);
+
+ if (ret==0)
+- fi->fh=(void *) fp;
++ fi->fh=(unsigned long) fp;
+
+ return ret;
+ }
+diff -up afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer afpfs-ng-0.8.1/include/afp.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100
++++ afpfs-ng-0.8.1/include/afpfs-ng/afp.h 2011-06-14 17:02:15.000000000 +0200
+@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s
+
+ int afp_opendt(struct afp_volume *volume, unsigned short * refnum);
+
+-int afp_closedt(struct afp_server * server, unsigned short * refnum);
++int afp_closedt(struct afp_server * server, unsigned short refnum);
+
+ int afp_getcomment(struct afp_volume *volume, unsigned int did,
+ const char * pathname, struct afp_comment * comment);
+diff -up afpfs-ng-0.8.1/include/afpfs-gn/utils.h.pointer afpfs-ng-0.8.1/include/utils.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100
++++ afpfs-ng-0.8.1/include/afpfs-ng/utils.h 2011-06-14 17:02:15.000000000 +0200
+@@ -8,8 +8,8 @@
+ #define hton64(x) (x)
+ #define ntoh64(x) (x)
+ #else /* BYTE_ORDER == BIG_ENDIAN */
+-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
+- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32))
++#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \
++ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32))
+ #define ntoh64(x) (hton64(x))
+ #endif /* BYTE_ORDER == BIG_ENDIAN */
+
+diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c
+--- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100
++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200
+@@ -33,7 +33,7 @@ static int check_port(char * port)
+ static int check_uamname(const char * uam)
+ {
+ char * p;
+- for (p=uam;*p;p++) {
++ for (p=(char *)uam;*p;p++) {
+ if (*p==' ') continue;
+ if ((*p<'A') || (*p>'z')) return -1;
+ }
+@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url,
+ return -1;
+
+ }
+- if (p==NULL) p=toparse;
++ if (p==NULL) p=(char *)toparse;
+
+ /* Now split on the first / */
+ if (sscanf(p,"%[^/]/%[^$]",
+diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c
+--- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100
++++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200
+@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume
+
+
+ /* Go to the end of last known entry */
+- p=path+(p-copy);
++ p=(char *)path+(p-copy);
+ p2=p;
+
+ while ((p=strchr(p+1,'/'))) {
+diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c
+--- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100
++++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200
+@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv
+ }
+ server->flags=ntohs(reply1->flags);
+
+- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1));
++ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1));
+ p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1;
+
+ /* Now work our way through the variable bits */
+@@ -757,7 +757,7 @@ gotenough:
+ printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read);
+ #endif
+ ret = read(server->fd, (void *)
+- (((unsigned int) server->incoming_buffer)+server->data_read),
++ (((unsigned long) server->incoming_buffer)+server->data_read),
+ amount_to_read);
+ if (ret<0) return -1;
+ if (ret==0) {
+diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c
+--- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100
++++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200
+@@ -25,7 +25,7 @@
+ static unsigned char exit_program=0;
+
+ static pthread_t ending_thread;
+-static pthread_t main_thread = NULL;
++static pthread_t main_thread = (pthread_t)NULL;
+
+ static int loop_started=0;
+ static pthread_cond_t loop_started_condition;
+diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c
+--- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100
++++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200
+@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum
+ if (volume->server->using_version->av_number>=30)
+ stbuf->st_mode |= fp.unixprivs.permissions;
+ else
+- set_nonunix_perms(stbuf,&fp);
++ set_nonunix_perms(&stbuf->st_mode,&fp);
+
+ stbuf->st_uid=fp.unixprivs.uid;
+ stbuf->st_gid=fp.unixprivs.gid;
+diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c
+--- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100
++++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200
+@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume,
+ {
+
+ int ret,err=0;
+- int totalwritten = 0;
++ size_t totalwritten = 0;
+ uint64_t sizetowrite, ignored;
+ unsigned char flags = 0;
+ unsigned int max_packet_size=volume->server->tx_quantum;
+diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c
+--- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100
++++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200
+@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v
+ copy_path(server,p,pathname,strlen(pathname));
+ unixpath_to_afppath(server,p);
+ p2=p+sizeof_path_header(server)+strlen(pathname);
+- if (((unsigned int ) p2) & 0x1) p2++;
++ if (((unsigned long) p2) & 0x1) p2++;
+ req2=(void *) p2;
+
+ req2->len=htons(namelen);
+diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c
+--- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100
++++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200
+@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv
+ return 0;
+ }
+
+-int afp_closedt(struct afp_server * server, unsigned short * refnum)
++int afp_closedt(struct afp_server * server, unsigned short refnum)
+ {
+ struct {
+ struct dsi_header dsi_header __attribute__((__packed__));
+diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c
+--- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100
++++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200
+@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve
+
+ return 0;
+ }
++
+ int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other)
+ {
+
+@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s
+ char * p = buf + sizeof(*reply);
+ int i;
+ char *max=buf+size;
+- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL;
+- void ** x = other;
++ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other;
+
+ if (reply->dsi_header.return_code.error_code) {
+ return reply->dsi_header.return_code.error_code;
+diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c
+--- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100
++++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200
+@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s
+
+ if (reply->header.return_code.error_code!=kFPNoErr) return -1;
+
+- copy_from_pascal_two(name,&reply->name,255);
++ copy_from_pascal_two(name,reply->name,255);
+
+ return 0;
+ }
+diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c
+--- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100
++++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200
+@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve
+ switch (type) {
+ case kLoginWithTimeAndID:
+ case kReconnWithTimeAndID: {
+- uint32_t *p = (void *) (((unsigned int) request)+
++ uint32_t *p = (void *) (((unsigned long) request)+
+ sizeof(*request));
+
+ offset=sizeof(timestamp);
+@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve
+ goto error;
+ }
+
+- data=(void *) (((unsigned int) request)+sizeof(*request)+offset);
++ data=(void *) (((unsigned long) request)+sizeof(*request)+offset);
+ request->idlength=htonl(datalen);
+ request->pad=0;
+ request->type=htons(type);
+@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_
+ if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL)
+ return -1;
+
+- token_data = request + sizeof(*request);
++ token_data = (char *)request + sizeof(*request);
+
+ request->type=htons(type);
+
+diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c
+--- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100
++++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200
+@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser
+ goto cleartxt_fail;
+
+ p += copy_to_pascal(p, username) + 1;
+- if ((int)p & 0x1)
++ if ((long)p & 0x1)
+ len--;
+ else
+ p++;
+@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se
+ goto cleartxt_fail;
+
+ p += copy_to_pascal(p, username) + 1;
+- if ((int)p & 0x1)
++ if ((long)p & 0x1)
+ len--;
+ else
+ p++;
+@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server *
+ if (ai == NULL)
+ goto dhx_noctx_fail;
+ d += copy_to_pascal(ai, username) + 1;
+- if (((int)d) % 2)
++ if (((long)d) % 2)
+ d++;
+ else
+ ai_len--;
+diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c
+--- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100
++++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200
+@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server *
+ maxlen=255;
+
+
+- p=filename+1;
++ p=(char *)filename+1;
+ while ((q=strchr(p,'/'))) {
+ if (q>p+maxlen)
+ return 1;
diff --git a/abs/extra/community/afpfs-ng/10-fix-errno.patch b/abs/extra/community/afpfs-ng/10-fix-errno.patch
new file mode 100644
index 0000000..ff7ce44
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/10-fix-errno.patch
@@ -0,0 +1,23 @@
+--- afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:42:42.000000000 +0200
++++ afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:39:44.000000000 +0200
+@@ -19,7 +19,6 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include <errno.h>
+
+ #include <afpfs-ng/afp_protocol.h>
+ #include <afpfs-ng/libafpclient.h>
+--- afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:42:42.000000000 +0200
++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:40:27.000000000 +0200
+@@ -21,7 +21,9 @@
+
+ static int check_port(char * port)
+ {
+- long long ret = strtol(port,NULL,10);
++ long long ret = 0;
++ errno = 0;
++ ret = strtol(port,NULL,10);
+ if ((ret<0) || (ret>32767)) return -1;
+ if (errno) {
+ printf("port error\n");
diff --git a/abs/extra/community/afpfs-ng/20-build-error-fixes.patch b/abs/extra/community/afpfs-ng/20-build-error-fixes.patch
new file mode 100644
index 0000000..303e264
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/20-build-error-fixes.patch
@@ -0,0 +1,125 @@
+Description: Fix build errors.
+Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/build-error-fixes.patch
+
+--- a/lib/afp_url.c
++++ b/lib/afp_url.c
+@@ -233,7 +233,7 @@
+ }
+ }
+
+- snprintf(url->servername,strlen(p)+1,p);
++ strcpy(url->servername,p);
+ if (check_servername(url->servername)) {
+ if (verbose) printf("This isn't a valid servername\n");
+ return -1;
+@@ -263,7 +263,7 @@
+ if ((q=escape_strrchr(p,':',":"))) {
+ *q='\0';
+ q++;
+- snprintf(url->password,strlen(q)+1,q);
++ strcpy(url->password,q);
+ if (check_password(url->password)) {
+ if (verbose) printf("This isn't a valid passwd\n");
+ return -1;
+@@ -276,7 +276,7 @@
+ if ((q=strstr(p,";AUTH="))) {
+ *q='\0';
+ q+=6;
+- snprintf(url->uamname,strlen(q)+1,q);
++ strcpy(url->uamname,q);
+ if (check_uamname(url->uamname)) {
+ if (verbose) printf("This isn't a valid uamname\n");
+ return -1;
+@@ -284,7 +284,7 @@
+ }
+
+ if (strlen(p)>0) {
+- snprintf(url->username,strlen(p)+1,p);
++ strcpy(url->username,p);
+ if (check_username(url->username)) {
+ if (verbose) printf("This isn't a valid username\n");
+ return -1;;
+@@ -304,12 +304,12 @@
+ *q='\0';
+ q++;
+ }
+- snprintf(url->volumename,strlen(p)+1,p);
++ strcpy(url->volumename,p);
+
+
+ if (q) {
+ url->path[0]='/';
+- snprintf(url->path+1,strlen(q)+1,q);
++ strcpy(url->path+1,q);
+ }
+
+ done:
+--- a/fuse/commands.c
++++ b/fuse/commands.c
+@@ -163,8 +163,7 @@
+
+ if (c) {
+ len = strlen(c->client_string);
+- snprintf(c->client_string+len,
+- MAX_CLIENT_RESPONSE-len,
++ strcpy(c->client_string+len,
+ message);
+ } else {
+
+@@ -468,7 +467,7 @@
+ volume->mapping=req->map;
+ afp_detect_mapping(volume);
+
+- snprintf(volume->mountpoint,255,req->mountpoint);
++ strcpy(volume->mountpoint,req->mountpoint);
+
+ /* Create the new thread and block until we get an answer back */
+ {
+--- a/fuse/client.c
++++ b/fuse/client.c
+@@ -547,7 +547,7 @@
+ done:
+ memset(toprint,0,MAX_CLIENT_RESPONSE+200);
+ snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer));
+- printf(toprint);
++ printf("%s",toprint);
+ return ((struct afp_server_response *) incoming_buffer)->result;
+
+ return 0;
+--- a/cmdline/cmdline_afp.c
++++ b/cmdline/cmdline_afp.c
+@@ -828,11 +828,11 @@
+ char text[40960];
+
+ afp_status_header(text,&len);
+- printf(text);
++ printf("%s",text);
+
+ len=40960;
+ afp_status_server(server,text,&len);
+- printf(text);
++ printf("%s",text);
+ return 0;
+ }
+
+--- a/cmdline/cmdline_testafp.c
++++ b/cmdline/cmdline_testafp.c
+@@ -26,12 +26,12 @@
+ struct afp_url valid_url;
+ afp_default_url(&valid_url);
+ valid_url.protocol=protocol;
+- sprintf(valid_url.servername,servername);
+- sprintf(valid_url.volumename,volumename);
+- sprintf(valid_url.path,path);
+- sprintf(valid_url.username,username);
+- sprintf(valid_url.password,password);
+- sprintf(valid_url.uamname,uamname);
++ strcpy(valid_url.servername,servername);
++ strcpy(valid_url.volumename,volumename);
++ strcpy(valid_url.path,path);
++ strcpy(valid_url.username,username);
++ strcpy(valid_url.password,password);
++ strcpy(valid_url.uamname,uamname);
+ valid_url.port=port;
+
+ if (afp_url_validate(url_string,&valid_url))
diff --git a/abs/extra/community/afpfs-ng/21-header-path-fix.patch b/abs/extra/community/afpfs-ng/21-header-path-fix.patch
new file mode 100644
index 0000000..fe79b1f
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/21-header-path-fix.patch
@@ -0,0 +1,16 @@
+Description: Ensure internal headers are picked instead of system headers.
+Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/header-path-fix.patch
+
+--- a/include/afpfs-ng/afp.h
++++ b/include/afpfs-ng/afp.h
+@@ -7,8 +7,8 @@
+ #include <netdb.h>
+ #include <sys/statvfs.h>
+ #include <pwd.h>
+-#include <afpfs-ng/afp_protocol.h>
+-#include <afpfs-ng/libafpclient.h>
++#include "afp_protocol.h"
++#include "libafpclient.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
diff --git a/abs/extra/community/afpfs-ng/30-include-fixes.patch b/abs/extra/community/afpfs-ng/30-include-fixes.patch
new file mode 100644
index 0000000..de4f883
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/30-include-fixes.patch
@@ -0,0 +1,44 @@
+--- a/include/afpfs-ng/dsi.h 2012-02-23 10:02:07.062734160 +0100
++++ b/include/afpfs-ng/dsi.h 2012-02-23 10:09:46.297111254 +0100
+@@ -2,7 +2,7 @@
+ #ifndef __DSI_H_
+ #define __DSI_H_
+
+-#include "afpfs-ng/afp.h"
++#include "afp.h"
+
+ struct dsi_request
+ {
+--- a/include/afpfs-ng/map_def.h 2012-02-23 10:02:07.062734160 +0100
++++ b/include/afpfs-ng/map_def.h 2012-02-23 10:11:32.769953053 +0100
+@@ -1,7 +1,7 @@
+ #ifndef __MAP_H_
+ #define __MAP_H_
+
+-#include "afpfs-ng/afp.h"
++#include "afp.h"
+
+ #define AFP_MAPPING_UNKNOWN 0
+ #define AFP_MAPPING_COMMON 1
+--- a/include/afpfs-ng/midlevel.h 2012-02-23 10:02:07.062734160 +0100
++++ b/include/afpfs-ng/midlevel.h 2012-02-23 10:12:40.519943675 +0100
+@@ -2,7 +2,7 @@
+ #define __MIDLEVEL_H_
+
+ #include <utime.h>
+-#include "afpfs-ng/afp.h"
++#include "afp.h"
+
+ int ml_open(struct afp_volume * volume, const char *path, int flags,
+ struct afp_file_info **newfp);
+--- a/include/afpfs-ng/utils.h 2012-02-23 10:14:42.212332892 +0100
++++ b/include/afpfs-ng/utils.h 2012-02-23 10:14:51.116069525 +0100
+@@ -2,7 +2,7 @@
+ #define __UTILS_H_
+ #include <stdio.h>
+
+-#include "afpfs-ng/afp.h"
++#include "afp.h"
+
+ #if BYTE_ORDER == BIG_ENDIAN
+ #define hton64(x) (x)
diff --git a/abs/extra/community/afpfs-ng/PKGBUILD b/abs/extra/community/afpfs-ng/PKGBUILD
new file mode 100644
index 0000000..4538db9
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+# Contributor: slubman <slubman.dndd@laposte.net>
+
+pkgname=afpfs-ng
+pkgver=0.8.1
+pkgrel=5
+pkgdesc="A client for the Apple Filing Protocol (AFP)"
+url="http://alexthepuffin.googlepages.com/"
+license=('GPL')
+depends=('gmp' 'fuse' 'libgcrypt')
+arch=('i686' 'x86_64')
+options=(!libtool)
+source=(
+ "http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2"
+ 'fix_afpfs-ng_includes.patch'
+ '01-gcrypt.patch'
+ '02-pointer.patch'
+ '10-fix-errno.patch'
+ '20-build-error-fixes.patch'
+ '21-header-path-fix.patch'
+ '30-include-fixes.patch'
+)
+sha256sums=(
+ '688560de1cde57ab8d9e0ef7dc6436dbf0267fe8884f9014e50ff92b297b01a8'
+ '627d94ab3c1cbc002b18839f514c6fa980b0a25dfc21e8761b389fcd39f32755'
+ '18dc77b064fc02c229e0cfa071a7e31cde6d0243671ebde2f561ebdf09dc38bb'
+ '8537b086c496e776be2a6757325717cb15dee6dcf2aedccebed6b4b2332d3dc1'
+ '0e1c0c0e3a9ff6e55ccbbbc1b4de630c874ff058e2ea94360b7d90e650d04811'
+ '393662da1bcd5d3aba180a2add37d9006e0a487c3bb7bf157a15aa492f4d6a87'
+ 'f551ae9debe8ce2c4ed1d7a8bce497801ace995473876a5fefa0443353232477'
+ '71b8f52923cef39f0cccb8fdff610575958fd5dbed66e5aa4413ae6aceeec656'
+)
+
+build() {
+ cd "$pkgname-$pkgver"
+ # apply patches
+ msg2 'fix_afpfs-ng_includes.patch'
+ patch -Np1 -i "$srcdir/fix_afpfs-ng_includes.patch"
+ msg2 '01-gcrypt.patch'
+ patch -Np1 -i "$srcdir/01-gcrypt.patch"
+ msg2 '02-pointer.patch'
+ patch -Np1 -i "$srcdir/02-pointer.patch"
+ msg2 '10-fix-errno.patch'
+ patch -Np1 -i "$srcdir/10-fix-errno.patch"
+ msg2 '20-build-error-fixes.patch'
+ patch -Np1 -i "$srcdir/20-build-error-fixes.patch"
+ msg2 '21-header-path-fix.patch'
+ patch -Np1 -i "$srcdir/21-header-path-fix.patch"
+ msg2 '30-include-fixes.patch'
+ patch -Np1 -i "$srcdir/30-include-fixes.patch"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ # install headers
+ cd include
+ for header in afpfs-ng/*.h; do
+ install -Dm644 "$header" "$pkgdir/usr/include/$header"
+ done
+}
diff --git a/abs/extra/community/afpfs-ng/fix_afpfs-ng_includes.patch b/abs/extra/community/afpfs-ng/fix_afpfs-ng_includes.patch
new file mode 100644
index 0000000..f507a48
--- /dev/null
+++ b/abs/extra/community/afpfs-ng/fix_afpfs-ng_includes.patch
@@ -0,0 +1,3082 @@
+diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_afp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c
+--- afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-02-19 02:54:19.000000000 +0100
++++ afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c 2011-09-10 12:13:50.102124369 +0200
+@@ -3,9 +3,9 @@
+
+ */
+
+-#include "afp.h"
+-#include "midlevel.h"
+-#include "map_def.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/midlevel.h"
++#include "afpfs-ng/map_def.h"
+
+ #include <string.h>
+ #include <stdio.h>
+diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_testafp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c
+--- afpfs-ng-0.8.1/cmdline/cmdline_testafp.c 2008-03-04 21:16:50.000000000 +0100
++++ afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c 2011-09-10 12:13:50.102124369 +0200
+@@ -3,8 +3,8 @@
+
+ */
+
+-#include "afp.h"
+-#include "midlevel.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/midlevel.h"
+
+ #include "cmdline_main.h"
+
+diff -Naur afpfs-ng-0.8.1/cmdline/getstatus.c afpfs-ng-0.8.1.patch/cmdline/getstatus.c
+--- afpfs-ng-0.8.1/cmdline/getstatus.c 2008-02-18 04:28:09.000000000 +0100
++++ afpfs-ng-0.8.1.patch/cmdline/getstatus.c 2011-09-10 12:13:50.109124463 +0200
+@@ -2,7 +2,7 @@
+ #include <string.h>
+ #include <pthread.h>
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ static int getstatus(char * address_string, unsigned int port)
+ {
+diff -Naur afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1.patch/configure.ac
+--- afpfs-ng-0.8.1/configure.ac 2008-03-08 17:23:12.000000000 +0100
++++ afpfs-ng-0.8.1.patch/configure.ac 2011-09-10 12:13:50.109124463 +0200
+@@ -11,6 +11,7 @@
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
++AM_PROG_CC_C_O
+
+ # Checks for libraries.
+ # FIXME: Replace `main' with a function in `-lncurses':
+@@ -105,7 +106,7 @@
+
+
+
+-AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile docs/Makefile])
++AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile include/Makefile include/afpfs-ng/Makefile docs/Makefile])
+
+ AC_OUTPUT
+
+diff -Naur afpfs-ng-0.8.1/fuse/client.c afpfs-ng-0.8.1.patch/fuse/client.c
+--- afpfs-ng-0.8.1/fuse/client.c 2008-03-08 03:44:16.000000000 +0100
++++ afpfs-ng-0.8.1.patch/fuse/client.c 2011-09-10 12:13:50.110124477 +0200
+@@ -12,11 +12,11 @@
+ #include <grp.h>
+
+ #include "config.h"
+-#include <afp.h>
++#include <afpfs-ng/afp.h>
+ #include "afp_server.h"
+-#include "uams_def.h"
+-#include "map_def.h"
+-#include "libafpclient.h"
++#include "afpfs-ng/uams_def.h"
++#include "afpfs-ng/map_def.h"
++#include "afpfs-ng/libafpclient.h"
+
+ #define default_uam "Cleartxt Passwrd"
+
+diff -Naur afpfs-ng-0.8.1/fuse/commands.c afpfs-ng-0.8.1.patch/fuse/commands.c
+--- afpfs-ng-0.8.1/fuse/commands.c 2008-03-08 17:06:25.000000000 +0100
++++ afpfs-ng-0.8.1.patch/fuse/commands.c 2011-09-10 12:13:50.110124477 +0200
+@@ -19,15 +19,15 @@
+ #include <getopt.h>
+ #include <signal.h>
+
+-#include "afp.h"
+-#include "dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/dsi.h"
+ #include "afp_server.h"
+-#include "utils.h"
++#include "afpfs-ng/utils.h"
+ #include "daemon.h"
+-#include "uams_def.h"
+-#include "codepage.h"
+-#include "libafpclient.h"
+-#include "map_def.h"
++#include "afpfs-ng/uams_def.h"
++#include "afpfs-ng/codepage.h"
++#include "afpfs-ng/libafpclient.h"
++#include "afpfs-ng/map_def.h"
+ #include "fuse_int.h"
+ #include "fuse_error.h"
+ #include "fuse_internal.h"
+diff -Naur afpfs-ng-0.8.1/fuse/daemon.c afpfs-ng-0.8.1.patch/fuse/daemon.c
+--- afpfs-ng-0.8.1/fuse/daemon.c 2008-03-04 18:26:05.000000000 +0100
++++ afpfs-ng-0.8.1.patch/fuse/daemon.c 2011-09-10 12:13:50.110124477 +0200
+@@ -23,11 +23,11 @@
+ #include <signal.h>
+ #include <sys/socket.h>
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+-#include "dsi.h"
++#include "afpfs-ng/dsi.h"
+ #include "afp_server.h"
+-#include "utils.h"
++#include "afpfs-ng/utils.h"
+ #include "daemon.h"
+ #include "commands.h"
+
+diff -Naur afpfs-ng-0.8.1/fuse/fuse_error.c afpfs-ng-0.8.1.patch/fuse/fuse_error.c
+--- afpfs-ng-0.8.1/fuse/fuse_error.c 2008-01-18 05:40:10.000000000 +0100
++++ afpfs-ng-0.8.1.patch/fuse/fuse_error.c 2011-09-10 12:13:50.111124491 +0200
+@@ -4,7 +4,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <stdio.h>
+-#include "libafpclient.h"
++#include "afpfs-ng/libafpclient.h"
+ #include "fuse_internal.h"
+
+ #define TMP_FILE "/tmp/fuse_stderr"
+diff -Naur afpfs-ng-0.8.1/fuse/fuse_int.c afpfs-ng-0.8.1.patch/fuse/fuse_int.c
+--- afpfs-ng-0.8.1/fuse/fuse_int.c 2008-03-02 06:06:24.000000000 +0100
++++ afpfs-ng-0.8.1.patch/fuse/fuse_int.c 2011-09-10 12:13:50.111124491 +0200
+@@ -18,7 +18,7 @@
+ #define FUSE_USE_VERSION 25
+
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ #include <fuse.h>
+ #include <stdio.h>
+@@ -39,10 +39,10 @@
+ #include <pwd.h>
+ #include <stdarg.h>
+
+-#include "dsi.h"
+-#include "afp_protocol.h"
+-#include "codepage.h"
+-#include "midlevel.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/codepage.h"
++#include "afpfs-ng/midlevel.h"
+ #include "fuse_error.h"
+
+ /* Uncomment the following line to enable full debugging: */
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/afp.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h 2011-09-10 12:13:50.112124505 +0200
+@@ -0,0 +1,533 @@
++
++#ifndef _AFP_H_
++#define _AFP_H_
++
++#include <arpa/inet.h>
++#include <pthread.h>
++#include <netdb.h>
++#include <sys/statvfs.h>
++#include <pwd.h>
++#include <afpfs-ng/afp_protocol.h>
++#include <afpfs-ng/libafpclient.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <netinet/in.h>
++
++
++#define AFPFS_VERSION "0.8.1"
++
++/* This is the maximum AFP version this library supports */
++#define AFP_MAX_SUPPORTED_VERSION 32
++
++/* afp_url is used to pass locations around */
++struct afp_url {
++ enum {TCPIP,AT} protocol;
++ char username[AFP_MAX_USERNAME_LEN];
++ char uamname[50];
++ char password[AFP_MAX_PASSWORD_LEN];
++ char servername[AFP_SERVER_NAME_UTF8_LEN];
++ int port;
++ char volumename[AFP_VOLUME_NAME_UTF8_LEN];
++ char path[AFP_MAX_PATH];
++
++ int requested_version;
++ char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */
++ char volpassword[9];;
++};
++
++struct afp_token {
++ unsigned int length;
++ char data[AFP_TOKEN_MAX_LEN];
++};
++
++#define SERVER_MAX_VERSIONS 10
++#define SERVER_MAX_UAMS 10
++
++struct afp_rx_buffer {
++ unsigned int size;
++ unsigned int maxsize;
++ char * data;
++ int errorcode;
++};
++
++
++struct afp_file_info {
++ unsigned short attributes;
++ unsigned int did;
++ unsigned int creation_date;
++ unsigned int modification_date;
++ unsigned int backup_date;
++ unsigned int fileid;
++ unsigned short offspring;
++ char sync;
++ char finderinfo[32];
++ char name[AFP_MAX_PATH];
++ char basename[AFP_MAX_PATH];
++ char translated_name[AFP_MAX_PATH];
++ struct afp_unixprivs unixprivs;
++ unsigned int accessrights;
++ struct afp_file_info * next;
++ struct afp_file_info * largelist_next;
++ unsigned char isdir;
++ unsigned long long size;
++ unsigned short resourcesize;
++ unsigned int resource;
++ unsigned short forkid;
++ struct afp_icon * icon;
++ int eof;
++};
++
++
++#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1
++#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2
++#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4
++#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8
++#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10
++#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20
++#define VOLUME_EXTRA_FLAGS_READONLY 0x40
++
++#define AFP_VOLUME_UNMOUNTED 0
++#define AFP_VOLUME_MOUNTED 1
++#define AFP_VOLUME_UNMOUNTING 2
++
++struct afp_volume {
++ unsigned short volid;
++ char flags; /* This is from afpGetSrvrParms */
++ unsigned short attributes; /* This is from VolOpen */
++ unsigned short signature; /* This is fixed or variable */
++ unsigned int creation_date;
++ unsigned int modification_date;
++ unsigned int backup_date;
++ struct statvfs stat;
++ unsigned char mounted;
++ char mountpoint[255];
++ struct afp_server * server;
++ char volume_name[AFP_VOLUME_NAME_LEN];
++ char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN];
++ unsigned short dtrefnum;
++ char volpassword[AFP_VOLPASS_LEN];
++ unsigned int extra_flags; /* This is an afpfs-ng specific field */
++
++ /* Our directory ID cache */
++ struct did_cache_entry * did_cache_base;
++ pthread_mutex_t did_cache_mutex;
++
++ /* Our journal of open forks */
++ struct afp_file_info * open_forks;
++ pthread_mutex_t open_forks_mutex;
++
++ /* Used to trigger startup */
++ pthread_cond_t startup_condition_cond;
++
++ struct {
++ uint64_t hits;
++ uint64_t misses;
++ uint64_t expired;
++ uint64_t force_removed;
++ } did_cache_stats;
++
++ void * priv; /* This is a private structure for fuse/cmdline, etc */
++ pthread_t thread; /* This is the per-volume thread */
++
++ int mapping;
++
++};
++
++#define SERVER_STATE_CONNECTED 1
++#define SERVER_STATE_DISCONNECTED 2
++
++enum server_type{
++ AFPFS_SERVER_TYPE_UNKNOWN,
++ AFPFS_SERVER_TYPE_NETATALK,
++ AFPFS_SERVER_TYPE_AIRPORT,
++ AFPFS_SERVER_TYPE_MACINTOSH,
++};
++
++#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK )
++#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT )
++#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH )
++
++
++
++struct afp_versions {
++ char *av_name;
++ int av_number;
++};
++extern struct afp_versions afp_versions[];
++
++struct afp_server {
++
++ /* Our buffer sizes */
++ unsigned int tx_quantum;
++ unsigned int rx_quantum;
++
++ unsigned int tx_delay;
++
++ /* Connection information */
++ struct sockaddr_in address;
++ int fd;
++
++ /* Some stats, for information only */
++ struct {
++ uint64_t runt_packets;
++ uint64_t incoming_dsi;
++ uint64_t rx_bytes;
++ uint64_t tx_bytes;
++ uint64_t requests_pending;
++ } stats;
++
++ /* General information */
++ char server_name[AFP_SERVER_NAME_LEN];
++ char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN];
++ char server_name_printable[AFP_SERVER_NAME_UTF8_LEN];
++
++ char machine_type[17];
++ char icon[256];
++ char signature[16];
++ unsigned short flags;
++ int connect_state;
++ enum server_type server_type;
++
++ /* This is the time we connected */
++ time_t connect_time;
++
++ /* UAMs */
++ unsigned int supported_uams;
++ unsigned int using_uam;
++
++ /* Authentication */
++ char username[AFP_MAX_USERNAME_LEN];
++ char password[AFP_MAX_PASSWORD_LEN];
++
++ /* Session */
++ struct afp_token token;
++ char need_resume;
++
++ /* Versions */
++ unsigned char requested_version;
++ unsigned char versions[SERVER_MAX_VERSIONS];
++ struct afp_versions *using_version;
++
++ /* Volumes */
++ unsigned char num_volumes;
++ struct afp_volume * volumes;
++
++ void * dsi;
++ unsigned int exit_flag;
++
++ /* Our DSI request queue */
++ pthread_mutex_t requestid_mutex;
++ pthread_mutex_t request_queue_mutex;
++ unsigned short lastrequestid;
++ unsigned short expectedrequestid;
++ struct dsi_request * command_requests;
++
++
++ char loginmesg[200];
++ char servermesg[200];
++ char path_encoding;
++
++ /* This is the data for the incoming buffer */
++ char * incoming_buffer;
++ int data_read;
++ int bufsize;
++
++ /* And this is for the outgoing queue */
++ pthread_mutex_t send_mutex;
++
++ /* This is for user mapping */
++ struct passwd passwd;
++ unsigned int server_uid, server_gid;
++ int server_gid_valid;
++
++ struct afp_server *next;
++
++ /* These are for DSI attention packets */
++ unsigned int attention_quantum;
++ unsigned int attention_len;
++ char * attention_buffer;
++
++};
++
++struct afp_extattr_info {
++ unsigned int maxsize;
++ unsigned int size;
++ char data[1024];
++};
++struct afp_comment {
++ unsigned int maxsize;
++ unsigned int size;
++ char *data;
++};
++
++struct afp_icon {
++ unsigned int maxsize;
++ unsigned int size;
++ char *data;
++};
++
++#define AFP_DEFAULT_ATTENTION_QUANTUM 1024
++
++void afp_unixpriv_to_stat(struct afp_file_info *fp,
++ struct stat *stat);
++
++int init_uams(void) ;
++
++unsigned int find_uam_by_name(const char * name);
++char * uam_bitmap_to_string(unsigned int bitmap);
++
++
++char * get_uam_names_list(void);
++
++unsigned int default_uams_mask(void);
++
++struct afp_volume * find_volume_by_name(struct afp_server * server,
++ const char * volname);
++
++struct afp_connection_request {
++ unsigned int uam_mask;
++ struct afp_url url;
++};
++
++void afp_default_url(struct afp_url *url);
++int afp_parse_url(struct afp_url * url, const char * toparse, int verbose);
++void afp_print_url(struct afp_url * url);
++int afp_url_validate(char * url_string, struct afp_url * valid_url);
++
++int afp_list_volnames(struct afp_server * server, char * names, int max);
++
++/* User mapping */
++int afp_detect_mapping(struct afp_volume * volume);
++
++/* These are some functions that help with simple status text generation */
++
++int afp_status_header(char * text, int * len);
++int afp_status_server(struct afp_server * s,char * text, int * len);
++
++
++struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req);
++
++void * just_end_it_now(void *other);
++void add_fd_and_signal(int fd);
++void loop_disconnect(struct afp_server *s);
++void afp_wait_for_started_loop(void);
++
++
++struct afp_versions * pick_version(unsigned char *versions,
++ unsigned char requested) ;
++int pick_uam(unsigned int u1, unsigned int u2);
++
++int afp_server_login(struct afp_server *server,
++ char * mesg, unsigned int *l, unsigned int max);
++
++
++int afp_dologin(struct afp_server *server,
++ unsigned int uam, char * username, char * passwd);
++
++void afp_free_server(struct afp_server **server);
++
++struct afp_server * afp_server_init(struct sockaddr_in * address);
++int afp_get_address(void * priv, const char * hostname, unsigned int port,
++ struct sockaddr_in * address);
++
++
++int afp_main_loop(int command_fd);
++int afp_main_quick_startup(pthread_t * thread);
++
++int afp_server_destroy(struct afp_server *s) ;
++int afp_server_reconnect(struct afp_server * s, char * mesg,
++ unsigned int *l, unsigned int max);
++int afp_server_connect(struct afp_server *s, int full);
++
++struct afp_server * afp_server_complete_connection(
++ void * priv,
++ struct afp_server * server,
++ struct sockaddr_in * address, unsigned char * versions,
++ unsigned int uams, char * username, char * password,
++ unsigned int requested_version, unsigned int uam_mask);
++
++int afp_connect_volume(struct afp_volume * volume, struct afp_server * server,
++ char * mesg, unsigned int * l, unsigned int max);
++int something_is_mounted(struct afp_server * server);
++
++int add_cache_entry(struct afp_file_info * file) ;
++struct afp_file_info * get_cache_by_name(char * name);
++struct afp_server * find_server_by_address(struct sockaddr_in * address);
++struct afp_server * find_server_by_signature(char * signature);
++struct afp_server * find_server_by_name(char * name);
++int server_still_valid(struct afp_server * server);
++
++
++struct afp_server * get_server_base(void);
++int afp_server_remove(struct afp_server * server);
++
++int afp_unmount_volume(struct afp_volume * volume);
++int afp_unmount_all_volumes(struct afp_server * server);
++
++#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \
++ ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY))
++
++int afp_opendt(struct afp_volume *volume, unsigned short * refnum);
++
++int afp_closedt(struct afp_server * server, unsigned short * refnum);
++
++int afp_getcomment(struct afp_volume *volume, unsigned int did,
++ const char * pathname, struct afp_comment * comment);
++
++int afp_addcomment(struct afp_volume *volume, unsigned int did,
++ const char * pathname, char * comment,uint64_t *size);
++
++int afp_geticon(struct afp_volume * volume, unsigned int filecreator,
++ unsigned int filetype, unsigned char icontype,
++ unsigned short length, struct afp_icon * icon);
++
++/* Things you want to do to a server */
++
++int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg);
++
++int afp_login(struct afp_server *server, char * uaname,
++ char * userauthinfo, unsigned int userauthinfo_len,
++ struct afp_rx_buffer *rx);
++
++int afp_changepassword(struct afp_server *server, char * uaname,
++ char * userauthinfo, unsigned int userauthinfo_len,
++ struct afp_rx_buffer *rx);
++
++int afp_logincont(struct afp_server *server, unsigned short id,
++ char * userauthinfo, unsigned int userauthinfo_len,
++ struct afp_rx_buffer *rx);
++
++int afp_getsessiontoken(struct afp_server * server, int type,
++ unsigned int timestamp, struct afp_token *outgoing_token,
++ struct afp_token * incoming_token);
++
++int afp_getsrvrparms(struct afp_server *server);
++
++int afp_logout(struct afp_server *server,unsigned char wait);
++
++int afp_mapname(struct afp_server * server, unsigned char subfunction,
++ char * name, unsigned int * id);
++
++int afp_mapid(struct afp_server * server, unsigned char subfunction,
++ unsigned int id, char *name);
++
++int afp_getuserinfo(struct afp_server * server, int thisuser,
++ unsigned int userid, unsigned short bitmap,
++ unsigned int *newuid, unsigned int *newgid);
++
++int afp_zzzzz(struct afp_server *server);
++
++int afp_volopen(struct afp_volume * volume,
++ unsigned short bitmap, char * password);
++
++int afp_flush(struct afp_volume * volume);
++
++int afp_getfiledirparms(struct afp_volume *volume, unsigned int did,
++ unsigned int filebitmap, unsigned int dirbitmap, const char * pathname,
++ struct afp_file_info *fp);
++
++int afp_enumerate(struct afp_volume * volume,
++ unsigned int dirid,
++ unsigned int filebitmap, unsigned int dirbitmap,
++ unsigned short reqcount,
++ unsigned short startindex,
++ char * path,
++ struct afp_file_info ** file_p);
++
++int afp_enumerateext2(struct afp_volume * volume,
++ unsigned int dirid,
++ unsigned int filebitmap, unsigned int dirbitmap,
++ unsigned short reqcount,
++ unsigned long startindex,
++ char * path,
++ struct afp_file_info ** file_p);
++
++int afp_openfork(struct afp_volume * volume,
++ unsigned char forktype,
++ unsigned int dirid,
++ unsigned short accessmode,
++ char * filename,
++ struct afp_file_info *fp);
++
++int afp_read(struct afp_volume * volume, unsigned short forkid,
++ uint32_t offset,
++ uint32_t count, struct afp_rx_buffer * rx);
++
++int afp_readext(struct afp_volume * volume, unsigned short forkid,
++ uint64_t offset,
++ uint64_t count, struct afp_rx_buffer * rx);
++
++int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap);
++
++
++int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p);
++
++int afp_delete(struct afp_volume * volume,
++ unsigned int dirid, char * pathname);
++
++
++int afp_createfile(struct afp_volume * volume, unsigned char flag,
++ unsigned int did, char * pathname);
++
++int afp_write(struct afp_volume * volume, unsigned short forkid,
++ uint32_t offset, uint32_t reqcount,
++ char * data, uint32_t * written);
++
++int afp_writeext(struct afp_volume * volume, unsigned short forkid,
++ uint64_t offset, uint64_t reqcount,
++ char * data, uint64_t * written);
++
++int afp_flushfork(struct afp_volume * volume, unsigned short forkid);
++
++int afp_closefork(struct afp_volume * volume, unsigned short forkid);
++int afp_setfileparms(struct afp_volume * volume,
++ unsigned int dirid, const char * pathname, unsigned short bitmap,
++ struct afp_file_info *fp);
++int afp_setfiledirparms(struct afp_volume * volume,
++ unsigned int dirid, const char * pathname, unsigned short bitmap,
++ struct afp_file_info *fp);
++
++int afp_setdirparms(struct afp_volume * volume,
++ unsigned int dirid, const char * pathname, unsigned short bitmap,
++ struct afp_file_info *fp);
++
++int afp_volclose(struct afp_volume * volume);
++
++
++int afp_setforkparms(struct afp_volume *volume,
++ unsigned short forkid, unsigned short bitmap, unsigned long len);
++
++int afp_byterangelock(struct afp_volume * volume,
++ unsigned char flag,
++ unsigned short forkid,
++ uint32_t offset,
++ uint32_t len, uint32_t *generated_offset);
++
++int afp_byterangelockext(struct afp_volume * volume,
++ unsigned char flag,
++ unsigned short forkid,
++ uint64_t offset,
++ uint64_t len, uint64_t *generated_offset);
++
++int afp_moveandrename(struct afp_volume *volume,
++ unsigned int src_did,
++ unsigned int dst_did,
++ char * src_path, char * dst_path, char *new_name);
++
++int afp_rename(struct afp_volume * volume,
++ unsigned int dirid,
++ char * path_from, char * path_to);
++
++int afp_listextattr(struct afp_volume * volume,
++ unsigned int dirid, unsigned short bitmap,
++ char * pathname, struct afp_extattr_info * info);
++
++/* This is a currently undocumented command */
++int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data);
++
++/* For debugging */
++char * afp_get_command_name(char code);
++
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h 2011-09-10 12:13:50.112124505 +0200
+@@ -0,0 +1,361 @@
++
++#ifndef _AFP_PROTOCOL_H_
++#define _AFP_PROTOCOL_H_
++
++#include <sys/types.h>
++#include <stddef.h>
++#include <unistd.h>
++#include <stdint.h>
++
++/* This file defines constants for the Apple File Protocol.
++ All page references are from "Apple Filing Protocol Programming" version 3.2.
++ except where noted.
++*/
++
++#define AFP_SERVER_NAME_LEN 33
++#define AFP_SERVER_NAME_UTF8_LEN 255
++#define AFP_VOLUME_NAME_LEN 33
++#define AFP_VOLUME_NAME_UTF8_LEN 33
++#define AFP_SIGNATURE_LEN 16
++#define AFP_MACHINETYPE_LEN 33
++#define AFP_LOGINMESG_LEN 200
++#define AFP_VOLPASS_LEN 8
++#define AFP_HOSTNAME_LEN 255
++/* This is actually just a guess, and only used for appletalk */
++#define AFP_ZONE_LEN 255
++
++#define AFP_SERVER_ICON_LEN 256
++
++
++#define AFP_MAX_USERNAME_LEN 127
++#define AFP_MAX_PASSWORD_LEN 127
++
++
++/* This is the maximum length of any UAM string */
++#define AFP_UAM_LENGTH 24
++
++/* This is the maximum length of any path description */
++#define AFP_MAX_PATH 768
++
++#define AFP_VOL_FLAT 1
++#define AFP_VOL_FIXED 2
++#define AFP_VOL_VARIABLE 3
++
++/* The root directory ID, p.26 */
++
++#define AFP_ROOT_DID 2
++
++/* Path type constants, p.249 */
++
++enum {
++kFPShortName = 1,
++kFPLongName = 2,
++kFPUTF8Name = 3
++};
++
++/* fork types */
++
++#define AFP_FORKTYPE_DATA 0x0
++#define AFP_FORKTYPE_RESOURCE 0x80
++
++/* openfork access modes, from p.196 */
++
++#define AFP_OPENFORK_ALLOWREAD 1
++#define AFP_OPENFORK_ALLOWWRITE 2
++#define AFP_OPENFORK_DENYREAD 0x10
++#define AFP_OPENFORK_DENYWRITE 0x20
++
++/* Message type for getsrvmesg, p. 169*/
++
++typedef enum {
++ AFPMESG_LOGIN = 0,
++ AFPMESG_SERVER = 1
++} afpmessage_t;
++
++/* Message bitmap for getsrvrmsg */
++
++#define AFP_GETSRVRMSG_UTF8 0x2
++#define AFP_GETSRVRMSG_GETMSG 0x1
++
++
++/* Maximum Version length, p.17 */
++#define AFP_MAX_VERSION_LENGTH 16
++
++/* Maximum length of a token, this is undocumented */
++#define AFP_TOKEN_MAX_LEN 256
++
++/* The maximum size of a file for AFP 2 */
++#define AFP_MAX_AFP2_FILESIZE (4294967296)
++
++/* Unix privs, p.240 */
++
++struct afp_unixprivs {
++ uint32_t uid __attribute__((__packed__));
++ uint32_t gid __attribute__((__packed__));
++ uint32_t permissions __attribute__((__packed__));
++ uint32_t ua_permissions __attribute__((__packed__));
++
++};
++
++
++/* AFP Volume attributes bitmap, p.241 */
++
++enum {
++ kReadOnly = 0x01,
++ kHasVolumePassword = 0x02,
++ kSupportsFileIDs = 0x04,
++ kSupportsCatSearch = 0x08,
++ kSupportsBlankAccessPrivs = 0x10,
++ kSupportsUnixPrivs = 0x20,
++ kSupportsUTF8Names = 0x40,
++ kNoNetworkUserIDs = 0x80,
++ kDefaultPrivsFromParent = 0x100,
++ kNoExchangeFiles = 0x200,
++ kSupportsExtAttrs = 0x400,
++ kSupportsACLs=0x800
++};
++
++/* AFP file creation constantes, p.250 */
++enum {
++kFPSoftCreate = 0,
++kFPHardCreate = 0x80
++};
++
++/* AFP Directory attributes, taken from the protocol guide p.236 */
++
++enum {
++ kFPAttributeBit = 0x1,
++ kFPParentDirIDBit = 0x2,
++ kFPCreateDateBit = 0x4,
++ kFPModDateBit = 0x8,
++ kFPBackupDateBit = 0x10,
++ kFPFinderInfoBit = 0x20,
++ kFPLongNameBit = 0x40,
++ kFPShortNameBit = 0x80,
++ kFPNodeIDBit = 0x100,
++ kFPOffspringCountBit = 0x0200,
++ kFPOwnerIDBit = 0x0400,
++ kFPGroupIDBit = 0x0800,
++ kFPAccessRightsBit = 0x1000,
++ kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier
++ kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later
++ kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later
++};
++
++/* AFP File bitmap, p.238. These are the ones not in the AFP Directory
++ attributes map. */
++
++enum {
++ kFPDataForkLenBit = 0x0200,
++ kFPRsrcForkLenBit = 0x0400,
++ kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later
++ kFPLaunchLimitBit = 0x1000,
++ kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later
++};
++
++/* AFP Extended Attributes Bitmap, p.238 */
++
++enum {
++ kXAttrNoFollow = 0x1,
++ kXAttrCreate = 0x2,
++ kXAttrREplace=0x4
++};
++
++
++/* AFP function codes */
++enum AFPFunction
++{
++ afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork,
++ afpCopyFile, afpCreateDir, afpCreateFile,
++ afpDelete, afpEnumerate, afpFlush, afpFlushFork,
++ afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms,
++ afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID,
++ afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork,
++ afpRead, afpRename, afpSetDirParms, afpSetFileParms,
++ afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms,
++ afpSetFileDirParms, afpChangePassword,
++ afpGetUserInfo=37,afpGetSrvrMsg = 38,
++ afpOpenDT=48,
++ afpCloseDT=49,
++ afpGetIcon=51, afpGetIconInfo=52,
++ afpAddComment=56, afpRemoveComment=57, afpGetComment=58,
++ afpByteRangeLockExt=59, afpReadExt, afpWriteExt,
++ afpGetAuthMethods=62,
++ afp_LoginExt=63,
++ afpGetSessionToken=64,
++ afpDisconnectOldSession=65,
++ afpEnumerateExt=66,
++ afpCatSearchExt = 67,
++ afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr,
++ afpRemoveExtAttr , afpListExtAttrs,
++ afpZzzzz = 122,
++ afpAddIcon=192,
++};
++
++/* AFP Volume bitmap. Take from 242 of the protocol guide. */
++enum {
++ kFPBadVolPre222Bitmap = 0xFe00,
++ kFPBadVolBitmap = 0xF000,
++ kFPVolAttributeBit = 0x1,
++ kFPVolSignatureBit = 0x2,
++ kFPVolCreateDateBit = 0x4,
++ kFPVolModDateBit = 0x8,
++ kFPVolBackupDateBit = 0x10,
++ kFPVolIDBit = 0x20,
++ kFPVolBytesFreeBit = 0x40,
++ kFPVolBytesTotalBit = 0x80,
++ kFPVolNameBit = 0x100,
++ kFPVolExtBytesFreeBit = 0x200,
++ kFPVolExtBytesTotalBit = 0x400,
++ kFPVolBlockSizeBit = 0x800
++};
++
++/* AFP Attention Codes -- 4 bits */
++#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */
++#define AFPATTN_CRASH (1 << 14) /* server crashed */
++#define AFPATTN_MESG (1 << 13) /* server has message */
++#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */
++/* server notification */
++#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT)
++
++/* extended bitmap -- 12 bits. volchanged is only useful w/ a server
++ * notification, and time is only useful for shutdown. */
++#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */
++#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */
++
++#define kFPNoErr 0
++
++/* AFP result codes, p252 */
++#define kASPSessClosed -1072
++#define kFPAccessDenied -5000
++#define kFPAuthContinue -5001
++#define kFPBadUAM -5002
++#define kFPBadVersNum -5003
++#define kFPBitmapErr -5004
++#define kFPCantMove -5005
++#define kFPDenyConflict -5006
++#define kFPDirNotEmpty -5007
++#define kFPDiskFull -5008
++#define kFPEOFErr -5009
++#define kFPFileBusy -5010
++#define kFPFlatVol -5011
++#define kFPItemNotFound -5012
++#define kFPLockErr -5013
++#define kFPMiscErr -5014
++#define kFPNoMoreLocks -5015
++#define kFPNoServer -5016
++#define kFPObjectExists -5017
++#define kFPObjectNotFound -5018
++#define kFPParamErr -5019
++#define kFPRangeNotLocked -5020
++#define kFPRangeOverlap -5021
++#define kFPSessClosed -5022
++#define kFPUserNotAuth -5023
++#define kFPCallNotSupported -5024
++#define kFPObjectTypeErr -5025
++#define kFPTooManyFilesOpen -5026
++#define kFPServerGoingDown -5027
++#define kFPCantRename -5028
++#define kFPDirNotFound -5029
++#define kFPIconTypeError -5030
++#define kFPVolLocked -5031
++#define kFPObjectLocked -5032
++#define kFPContainsSharedErr -5033
++#define kFPIDNotFound -5034
++#define kFPIDExists -5035
++#define kFPDiffVolErr -5036
++#define kFPCatalogChanged -5037
++#define kFPSameObjectErr -5038
++#define kFPBadIDErr -5039
++#define kFPPwdSameErr -5040
++#define kFPPwdTooShortErr -5041
++#define kFPPwdExpiredErr -5042
++#define kFPInsideSharedErr -5043
++#define kFPInsideTrashErr -5044
++#define kFPPwdNeedsChangeErr -5045
++#define kFPPwdPolicyErr -5046
++#define kFPDiskQuotaExceeded –5047
++
++
++
++/* These flags determine to lock or unlock in ByteRangeLock(Ext) */
++
++enum {
++ByteRangeLock_Lock = 0,
++ByteRangeLock_Unlock = 1
++};
++
++/* These flags are used in volopen and getsrvrparm replies, p.171 */
++
++#define HasConfigInfo 0x1
++#define HasPassword 0x80
++
++/* These are the subfunction for kFPMapID, as per p.248 */
++
++enum {
++kUserIDToName = 1,
++kGroupIDToName = 2,
++kUserIDToUTF8Name = 3,
++kGroupIDToUTF8Name = 4,
++kUserUUIDToUTF8Name = 5,
++kGroupUUIDToUTF8Name = 6
++};
++
++
++/* These are the subfunction flags described in the FPMapName command, p.286.
++ Note that this is different than what's described on p. 186. */
++
++enum {
++kNameToUserID = 1,
++kNameToGroupID = 2,
++kUTF8NameToUserID = 3,
++kUTF8NameToGroupID = 4,
++kUTF8NameToUserUUID = 5,
++kUTF8NameToGroupUUID = 6
++};
++
++/* These are bits for FPGetUserInfo, p.173. */
++#define kFPGetUserInfo_USER_ID 1
++#define kFPGetUserInfo_PRI_GROUPID 2
++
++/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */
++
++enum {
++ kSupportsCopyfile = 0x01,
++ kSupportsChgPwd = 0x02,
++ kDontAllowSavePwd = 0x04,
++ kSupportsSrvrMsg = 0x08,
++ kSrvrSig = 0x10,
++ kSupportsTCP = 0x20,
++ kSupportsSrvrNotify = 0x40,
++ kSupportsReconnect = 0x80,
++ kSupportsDirServices = 0x100,
++ kSupportsUTF8SrvrName = 0x200,
++ kSupportsUUIDs = 0x400,
++ kSupportsSuperClient = 0x8000
++};
++
++
++/* p.247 */
++
++enum {
++ kLoginWithoutID = 0,
++ kLoginWithID = 1,
++ kReconnWithID = 2,
++ kLoginWithTimeAndID = 3,
++ kReconnWithTimeAndID = 4,
++ kRecon1Login = 5,
++ kRecon1ReconnectLogin = 6,
++ kRecon1Refresh = 7, kGetKerberosSessionKey = 8
++};
++
++
++#define AFP_CHMOD_ALLOWED_BITS_22 \
++ (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG )
++
++
++#endif
++
++
++
++
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/codepage.h afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/codepage.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h 2011-09-10 12:13:50.113124518 +0200
+@@ -0,0 +1,11 @@
++#ifndef __CODE_PAGE_H_
++#define __CODE_PAGE_H_
++int convert_utf8dec_to_utf8pre(const char *src, int src_len,
++ char * dest, int dest_len);
++int convert_utf8pre_to_utf8dec(const char * src, int src_len,
++ char * dest, int dest_len);
++int convert_path_to_unix(char encoding, char * dest,
++ char * src, int dest_len);
++int convert_path_to_afp(char encoding, char * dest,
++ char * src, int dest_len);
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/dsi.h afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/dsi.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h 2011-09-10 12:13:50.115124544 +0200
+@@ -0,0 +1,33 @@
++
++#ifndef __DSI_H_
++#define __DSI_H_
++
++#include "afpfs-ng/afp.h"
++
++struct dsi_request
++{
++ unsigned short requestid;
++ unsigned char subcommand;
++ void * other;
++ unsigned char wait;
++ pthread_cond_t condition_cond;
++ struct dsi_request * next;
++ int return_code;
++};
++
++int dsi_receive(struct afp_server * server, void * data, int size);
++int dsi_getstatus(struct afp_server * server);
++
++int dsi_opensession(struct afp_server *server);
++
++int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other);
++struct dsi_session * dsi_create(struct afp_server *server);
++int dsi_restart(struct afp_server *server);
++int dsi_recv(struct afp_server * server);
++
++#define DSI_BLOCK_TIMEOUT -1
++#define DSI_DONT_WAIT 0
++#define DSI_DEFAULT_TIMEOUT 5
++
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h 2011-09-10 12:13:50.115124544 +0200
+@@ -0,0 +1,50 @@
++
++#ifndef __CLIENT_H_
++#define __CLIENT_H_
++
++#include <unistd.h>
++#include <syslog.h>
++
++#define MAX_CLIENT_RESPONSE 2048
++
++
++enum loglevels {
++ AFPFSD,
++};
++
++struct afp_server;
++struct afp_volume;
++
++struct libafpclient {
++ int (*unmount_volume) (struct afp_volume * volume);
++ void (*log_for_client)(void * priv,
++ enum loglevels loglevel, int logtype, const char *message);
++ void (*forced_ending_hook)(void);
++ int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd);
++ void (*loop_started)(void);
++} ;
++
++extern struct libafpclient * libafpclient;
++
++void libafpclient_register(struct libafpclient * tmpclient);
++
++
++void signal_main_thread(void);
++
++/* These are logging functions */
++
++#define MAXLOGSIZE 2048
++
++#define LOG_METHOD_SYSLOG 1
++#define LOG_METHOD_STDOUT 2
++
++void set_log_method(int m);
++
++
++void log_for_client(void * priv,
++ enum loglevels loglevel, int logtype, char * message,...);
++
++void stdout_log_for_client(void * priv,
++ enum loglevels loglevel, int logtype, const char *message);
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am
+--- afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am 2011-09-10 12:13:50.115124544 +0200
+@@ -0,0 +1,6 @@
++## Process this file with automake to produce Makefile.in
++
++afpfsincludedir = $(includedir)/afpfs-ng
++
++afpfsinclude_HEADERS = afp.h afp_protocol.h libafpclient.h
++nodist_afpfsinclude_HEADERS = codepage.h dsi.h map_def.h midlevel.h uams_def.h utils.h
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/map_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/map_def.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h 2011-09-10 12:13:50.116124557 +0200
+@@ -0,0 +1,15 @@
++#ifndef __MAP_H_
++#define __MAP_H_
++
++#include "afpfs-ng/afp.h"
++
++#define AFP_MAPPING_UNKNOWN 0
++#define AFP_MAPPING_COMMON 1
++#define AFP_MAPPING_LOGINIDS 2
++#define AFP_MAPPING_NAME 3
++
++unsigned int map_string_to_num(char * name);
++char * get_mapping_name(struct afp_volume * volume);
++
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h 2011-09-10 12:13:50.116124557 +0200
+@@ -0,0 +1,64 @@
++#ifndef __MIDLEVEL_H_
++#define __MIDLEVEL_H_
++
++#include <utime.h>
++#include "afpfs-ng/afp.h"
++
++int ml_open(struct afp_volume * volume, const char *path, int flags,
++ struct afp_file_info **newfp);
++
++int ml_creat(struct afp_volume * volume, const char *path,mode_t mode);
++
++int ml_readdir(struct afp_volume * volume,
++ const char *path,
++ struct afp_file_info **base);
++
++int ml_read(struct afp_volume * volume, const char *path,
++ char *buf, size_t size, off_t offset,
++ struct afp_file_info *fp, int * eof);
++
++int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode);
++
++int ml_unlink(struct afp_volume * vol, const char *path);
++
++int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode);
++
++int ml_close(struct afp_volume * volume, const char * path,
++ struct afp_file_info * fp);
++
++int ml_getattr(struct afp_volume * volume, const char *path,
++ struct stat *stbuf);
++
++int ml_write(struct afp_volume * volume, const char * path,
++ const char *data, size_t size, off_t offset,
++ struct afp_file_info * fp, uid_t uid,
++ gid_t gid);
++
++int ml_readlink(struct afp_volume * vol, const char * path,
++ char *buf, size_t size);
++
++int ml_rmdir(struct afp_volume * vol, const char *path);
++
++int ml_chown(struct afp_volume * vol, const char * path,
++ uid_t uid, gid_t gid);
++
++int ml_truncate(struct afp_volume * vol, const char * path, off_t offset);
++
++int ml_utime(struct afp_volume * vol, const char * path,
++ struct utimbuf * timebuf);
++
++int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2);
++
++int ml_rename(struct afp_volume * vol,
++ const char * path_from, const char * path_to);
++
++int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat);
++
++void afp_ml_filebase_free(struct afp_file_info **filebase);
++
++int ml_passwd(struct afp_server *server,
++ char * username, char * oldpasswd, char * newpasswd);
++
++
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h 2011-09-10 12:13:50.116124557 +0200
+@@ -0,0 +1,16 @@
++#ifndef __UAM_DEFS_H_
++#define __UAM_DEFS_H_
++
++#define UAM_NOUSERAUTHENT 0x1
++#define UAM_CLEARTXTPASSWRD 0x2
++#define UAM_RANDNUMEXCHANGE 0x4
++#define UAM_2WAYRANDNUM 0x8
++#define UAM_DHCAST128 0x10
++#define UAM_CLIENTKRB 0x20
++#define UAM_DHX2 0x40
++#define UAM_RECON1 0x80
++
++int uam_string_to_bitmap(char * name);
++char * uam_bitmap_to_string(unsigned int bitmap);
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/utils.h afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h
+--- afpfs-ng-0.8.1/include/afpfs-ng/utils.h 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h 2011-09-10 12:13:50.116124557 +0200
+@@ -0,0 +1,43 @@
++#ifndef __UTILS_H_
++#define __UTILS_H_
++#include <stdio.h>
++
++#include "afpfs-ng/afp.h"
++
++#if BYTE_ORDER == BIG_ENDIAN
++#define hton64(x) (x)
++#define ntoh64(x) (x)
++#else /* BYTE_ORDER == BIG_ENDIAN */
++#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
++ (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32))
++#define ntoh64(x) (hton64(x))
++#endif /* BYTE_ORDER == BIG_ENDIAN */
++
++#define min(a,b) (((a)<(b)) ? (a) : (b))
++#define max(a,b) (((a)>(b)) ? (a) : (b))
++
++
++
++unsigned char unixpath_to_afppath(
++ struct afp_server * server,
++ char * buf);
++
++unsigned char sizeof_path_header(struct afp_server * server);
++
++
++
++unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ;
++unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len);
++
++unsigned char copy_to_pascal(char *dest, const char *src);
++unsigned short copy_to_pascal_two(char *dest, const char *src);
++
++void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len);
++
++
++char * create_path(struct afp_server * server, char * pathname, unsigned short * len);
++
++
++int invalid_filename(struct afp_server * server, const char * filename);
++
++#endif
+diff -Naur afpfs-ng-0.8.1/include/afp.h afpfs-ng-0.8.1.patch/include/afp.h
+--- afpfs-ng-0.8.1/include/afp.h 2008-03-08 17:08:18.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afp.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,533 +0,0 @@
+-
+-#ifndef _AFP_H_
+-#define _AFP_H_
+-
+-#include <arpa/inet.h>
+-#include <pthread.h>
+-#include <netdb.h>
+-#include <sys/statvfs.h>
+-#include <pwd.h>
+-#include <afp_protocol.h>
+-#include <libafpclient.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <unistd.h>
+-#include <netinet/in.h>
+-
+-
+-#define AFPFS_VERSION "0.8.1"
+-
+-/* This is the maximum AFP version this library supports */
+-#define AFP_MAX_SUPPORTED_VERSION 32
+-
+-/* afp_url is used to pass locations around */
+-struct afp_url {
+- enum {TCPIP,AT} protocol;
+- char username[AFP_MAX_USERNAME_LEN];
+- char uamname[50];
+- char password[AFP_MAX_PASSWORD_LEN];
+- char servername[AFP_SERVER_NAME_UTF8_LEN];
+- int port;
+- char volumename[AFP_VOLUME_NAME_UTF8_LEN];
+- char path[AFP_MAX_PATH];
+-
+- int requested_version;
+- char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */
+- char volpassword[9];;
+-};
+-
+-struct afp_token {
+- unsigned int length;
+- char data[AFP_TOKEN_MAX_LEN];
+-};
+-
+-#define SERVER_MAX_VERSIONS 10
+-#define SERVER_MAX_UAMS 10
+-
+-struct afp_rx_buffer {
+- unsigned int size;
+- unsigned int maxsize;
+- char * data;
+- int errorcode;
+-};
+-
+-
+-struct afp_file_info {
+- unsigned short attributes;
+- unsigned int did;
+- unsigned int creation_date;
+- unsigned int modification_date;
+- unsigned int backup_date;
+- unsigned int fileid;
+- unsigned short offspring;
+- char sync;
+- char finderinfo[32];
+- char name[AFP_MAX_PATH];
+- char basename[AFP_MAX_PATH];
+- char translated_name[AFP_MAX_PATH];
+- struct afp_unixprivs unixprivs;
+- unsigned int accessrights;
+- struct afp_file_info * next;
+- struct afp_file_info * largelist_next;
+- unsigned char isdir;
+- unsigned long long size;
+- unsigned short resourcesize;
+- unsigned int resource;
+- unsigned short forkid;
+- struct afp_icon * icon;
+- int eof;
+-};
+-
+-
+-#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1
+-#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2
+-#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4
+-#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8
+-#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10
+-#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20
+-#define VOLUME_EXTRA_FLAGS_READONLY 0x40
+-
+-#define AFP_VOLUME_UNMOUNTED 0
+-#define AFP_VOLUME_MOUNTED 1
+-#define AFP_VOLUME_UNMOUNTING 2
+-
+-struct afp_volume {
+- unsigned short volid;
+- char flags; /* This is from afpGetSrvrParms */
+- unsigned short attributes; /* This is from VolOpen */
+- unsigned short signature; /* This is fixed or variable */
+- unsigned int creation_date;
+- unsigned int modification_date;
+- unsigned int backup_date;
+- struct statvfs stat;
+- unsigned char mounted;
+- char mountpoint[255];
+- struct afp_server * server;
+- char volume_name[AFP_VOLUME_NAME_LEN];
+- char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN];
+- unsigned short dtrefnum;
+- char volpassword[AFP_VOLPASS_LEN];
+- unsigned int extra_flags; /* This is an afpfs-ng specific field */
+-
+- /* Our directory ID cache */
+- struct did_cache_entry * did_cache_base;
+- pthread_mutex_t did_cache_mutex;
+-
+- /* Our journal of open forks */
+- struct afp_file_info * open_forks;
+- pthread_mutex_t open_forks_mutex;
+-
+- /* Used to trigger startup */
+- pthread_cond_t startup_condition_cond;
+-
+- struct {
+- uint64_t hits;
+- uint64_t misses;
+- uint64_t expired;
+- uint64_t force_removed;
+- } did_cache_stats;
+-
+- void * priv; /* This is a private structure for fuse/cmdline, etc */
+- pthread_t thread; /* This is the per-volume thread */
+-
+- int mapping;
+-
+-};
+-
+-#define SERVER_STATE_CONNECTED 1
+-#define SERVER_STATE_DISCONNECTED 2
+-
+-enum server_type{
+- AFPFS_SERVER_TYPE_UNKNOWN,
+- AFPFS_SERVER_TYPE_NETATALK,
+- AFPFS_SERVER_TYPE_AIRPORT,
+- AFPFS_SERVER_TYPE_MACINTOSH,
+-};
+-
+-#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK )
+-#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT )
+-#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH )
+-
+-
+-
+-struct afp_versions {
+- char *av_name;
+- int av_number;
+-};
+-extern struct afp_versions afp_versions[];
+-
+-struct afp_server {
+-
+- /* Our buffer sizes */
+- unsigned int tx_quantum;
+- unsigned int rx_quantum;
+-
+- unsigned int tx_delay;
+-
+- /* Connection information */
+- struct sockaddr_in address;
+- int fd;
+-
+- /* Some stats, for information only */
+- struct {
+- uint64_t runt_packets;
+- uint64_t incoming_dsi;
+- uint64_t rx_bytes;
+- uint64_t tx_bytes;
+- uint64_t requests_pending;
+- } stats;
+-
+- /* General information */
+- char server_name[AFP_SERVER_NAME_LEN];
+- char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN];
+- char server_name_printable[AFP_SERVER_NAME_UTF8_LEN];
+-
+- char machine_type[17];
+- char icon[256];
+- char signature[16];
+- unsigned short flags;
+- int connect_state;
+- enum server_type server_type;
+-
+- /* This is the time we connected */
+- time_t connect_time;
+-
+- /* UAMs */
+- unsigned int supported_uams;
+- unsigned int using_uam;
+-
+- /* Authentication */
+- char username[AFP_MAX_USERNAME_LEN];
+- char password[AFP_MAX_PASSWORD_LEN];
+-
+- /* Session */
+- struct afp_token token;
+- char need_resume;
+-
+- /* Versions */
+- unsigned char requested_version;
+- unsigned char versions[SERVER_MAX_VERSIONS];
+- struct afp_versions *using_version;
+-
+- /* Volumes */
+- unsigned char num_volumes;
+- struct afp_volume * volumes;
+-
+- void * dsi;
+- unsigned int exit_flag;
+-
+- /* Our DSI request queue */
+- pthread_mutex_t requestid_mutex;
+- pthread_mutex_t request_queue_mutex;
+- unsigned short lastrequestid;
+- unsigned short expectedrequestid;
+- struct dsi_request * command_requests;
+-
+-
+- char loginmesg[200];
+- char servermesg[200];
+- char path_encoding;
+-
+- /* This is the data for the incoming buffer */
+- char * incoming_buffer;
+- int data_read;
+- int bufsize;
+-
+- /* And this is for the outgoing queue */
+- pthread_mutex_t send_mutex;
+-
+- /* This is for user mapping */
+- struct passwd passwd;
+- unsigned int server_uid, server_gid;
+- int server_gid_valid;
+-
+- struct afp_server *next;
+-
+- /* These are for DSI attention packets */
+- unsigned int attention_quantum;
+- unsigned int attention_len;
+- char * attention_buffer;
+-
+-};
+-
+-struct afp_extattr_info {
+- unsigned int maxsize;
+- unsigned int size;
+- char data[1024];
+-};
+-struct afp_comment {
+- unsigned int maxsize;
+- unsigned int size;
+- char *data;
+-};
+-
+-struct afp_icon {
+- unsigned int maxsize;
+- unsigned int size;
+- char *data;
+-};
+-
+-#define AFP_DEFAULT_ATTENTION_QUANTUM 1024
+-
+-void afp_unixpriv_to_stat(struct afp_file_info *fp,
+- struct stat *stat);
+-
+-int init_uams(void) ;
+-
+-unsigned int find_uam_by_name(const char * name);
+-char * uam_bitmap_to_string(unsigned int bitmap);
+-
+-
+-char * get_uam_names_list(void);
+-
+-unsigned int default_uams_mask(void);
+-
+-struct afp_volume * find_volume_by_name(struct afp_server * server,
+- const char * volname);
+-
+-struct afp_connection_request {
+- unsigned int uam_mask;
+- struct afp_url url;
+-};
+-
+-void afp_default_url(struct afp_url *url);
+-int afp_parse_url(struct afp_url * url, const char * toparse, int verbose);
+-void afp_print_url(struct afp_url * url);
+-int afp_url_validate(char * url_string, struct afp_url * valid_url);
+-
+-int afp_list_volnames(struct afp_server * server, char * names, int max);
+-
+-/* User mapping */
+-int afp_detect_mapping(struct afp_volume * volume);
+-
+-/* These are some functions that help with simple status text generation */
+-
+-int afp_status_header(char * text, int * len);
+-int afp_status_server(struct afp_server * s,char * text, int * len);
+-
+-
+-struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req);
+-
+-void * just_end_it_now(void *other);
+-void add_fd_and_signal(int fd);
+-void loop_disconnect(struct afp_server *s);
+-void afp_wait_for_started_loop(void);
+-
+-
+-struct afp_versions * pick_version(unsigned char *versions,
+- unsigned char requested) ;
+-int pick_uam(unsigned int u1, unsigned int u2);
+-
+-int afp_server_login(struct afp_server *server,
+- char * mesg, unsigned int *l, unsigned int max);
+-
+-
+-int afp_dologin(struct afp_server *server,
+- unsigned int uam, char * username, char * passwd);
+-
+-void afp_free_server(struct afp_server **server);
+-
+-struct afp_server * afp_server_init(struct sockaddr_in * address);
+-int afp_get_address(void * priv, const char * hostname, unsigned int port,
+- struct sockaddr_in * address);
+-
+-
+-int afp_main_loop(int command_fd);
+-int afp_main_quick_startup(pthread_t * thread);
+-
+-int afp_server_destroy(struct afp_server *s) ;
+-int afp_server_reconnect(struct afp_server * s, char * mesg,
+- unsigned int *l, unsigned int max);
+-int afp_server_connect(struct afp_server *s, int full);
+-
+-struct afp_server * afp_server_complete_connection(
+- void * priv,
+- struct afp_server * server,
+- struct sockaddr_in * address, unsigned char * versions,
+- unsigned int uams, char * username, char * password,
+- unsigned int requested_version, unsigned int uam_mask);
+-
+-int afp_connect_volume(struct afp_volume * volume, struct afp_server * server,
+- char * mesg, unsigned int * l, unsigned int max);
+-int something_is_mounted(struct afp_server * server);
+-
+-int add_cache_entry(struct afp_file_info * file) ;
+-struct afp_file_info * get_cache_by_name(char * name);
+-struct afp_server * find_server_by_address(struct sockaddr_in * address);
+-struct afp_server * find_server_by_signature(char * signature);
+-struct afp_server * find_server_by_name(char * name);
+-int server_still_valid(struct afp_server * server);
+-
+-
+-struct afp_server * get_server_base(void);
+-int afp_server_remove(struct afp_server * server);
+-
+-int afp_unmount_volume(struct afp_volume * volume);
+-int afp_unmount_all_volumes(struct afp_server * server);
+-
+-#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \
+- ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY))
+-
+-int afp_opendt(struct afp_volume *volume, unsigned short * refnum);
+-
+-int afp_closedt(struct afp_server * server, unsigned short * refnum);
+-
+-int afp_getcomment(struct afp_volume *volume, unsigned int did,
+- const char * pathname, struct afp_comment * comment);
+-
+-int afp_addcomment(struct afp_volume *volume, unsigned int did,
+- const char * pathname, char * comment,uint64_t *size);
+-
+-int afp_geticon(struct afp_volume * volume, unsigned int filecreator,
+- unsigned int filetype, unsigned char icontype,
+- unsigned short length, struct afp_icon * icon);
+-
+-/* Things you want to do to a server */
+-
+-int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg);
+-
+-int afp_login(struct afp_server *server, char * uaname,
+- char * userauthinfo, unsigned int userauthinfo_len,
+- struct afp_rx_buffer *rx);
+-
+-int afp_changepassword(struct afp_server *server, char * uaname,
+- char * userauthinfo, unsigned int userauthinfo_len,
+- struct afp_rx_buffer *rx);
+-
+-int afp_logincont(struct afp_server *server, unsigned short id,
+- char * userauthinfo, unsigned int userauthinfo_len,
+- struct afp_rx_buffer *rx);
+-
+-int afp_getsessiontoken(struct afp_server * server, int type,
+- unsigned int timestamp, struct afp_token *outgoing_token,
+- struct afp_token * incoming_token);
+-
+-int afp_getsrvrparms(struct afp_server *server);
+-
+-int afp_logout(struct afp_server *server,unsigned char wait);
+-
+-int afp_mapname(struct afp_server * server, unsigned char subfunction,
+- char * name, unsigned int * id);
+-
+-int afp_mapid(struct afp_server * server, unsigned char subfunction,
+- unsigned int id, char *name);
+-
+-int afp_getuserinfo(struct afp_server * server, int thisuser,
+- unsigned int userid, unsigned short bitmap,
+- unsigned int *newuid, unsigned int *newgid);
+-
+-int afp_zzzzz(struct afp_server *server);
+-
+-int afp_volopen(struct afp_volume * volume,
+- unsigned short bitmap, char * password);
+-
+-int afp_flush(struct afp_volume * volume);
+-
+-int afp_getfiledirparms(struct afp_volume *volume, unsigned int did,
+- unsigned int filebitmap, unsigned int dirbitmap, const char * pathname,
+- struct afp_file_info *fp);
+-
+-int afp_enumerate(struct afp_volume * volume,
+- unsigned int dirid,
+- unsigned int filebitmap, unsigned int dirbitmap,
+- unsigned short reqcount,
+- unsigned short startindex,
+- char * path,
+- struct afp_file_info ** file_p);
+-
+-int afp_enumerateext2(struct afp_volume * volume,
+- unsigned int dirid,
+- unsigned int filebitmap, unsigned int dirbitmap,
+- unsigned short reqcount,
+- unsigned long startindex,
+- char * path,
+- struct afp_file_info ** file_p);
+-
+-int afp_openfork(struct afp_volume * volume,
+- unsigned char forktype,
+- unsigned int dirid,
+- unsigned short accessmode,
+- char * filename,
+- struct afp_file_info *fp);
+-
+-int afp_read(struct afp_volume * volume, unsigned short forkid,
+- uint32_t offset,
+- uint32_t count, struct afp_rx_buffer * rx);
+-
+-int afp_readext(struct afp_volume * volume, unsigned short forkid,
+- uint64_t offset,
+- uint64_t count, struct afp_rx_buffer * rx);
+-
+-int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap);
+-
+-
+-int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p);
+-
+-int afp_delete(struct afp_volume * volume,
+- unsigned int dirid, char * pathname);
+-
+-
+-int afp_createfile(struct afp_volume * volume, unsigned char flag,
+- unsigned int did, char * pathname);
+-
+-int afp_write(struct afp_volume * volume, unsigned short forkid,
+- uint32_t offset, uint32_t reqcount,
+- char * data, uint32_t * written);
+-
+-int afp_writeext(struct afp_volume * volume, unsigned short forkid,
+- uint64_t offset, uint64_t reqcount,
+- char * data, uint64_t * written);
+-
+-int afp_flushfork(struct afp_volume * volume, unsigned short forkid);
+-
+-int afp_closefork(struct afp_volume * volume, unsigned short forkid);
+-int afp_setfileparms(struct afp_volume * volume,
+- unsigned int dirid, const char * pathname, unsigned short bitmap,
+- struct afp_file_info *fp);
+-int afp_setfiledirparms(struct afp_volume * volume,
+- unsigned int dirid, const char * pathname, unsigned short bitmap,
+- struct afp_file_info *fp);
+-
+-int afp_setdirparms(struct afp_volume * volume,
+- unsigned int dirid, const char * pathname, unsigned short bitmap,
+- struct afp_file_info *fp);
+-
+-int afp_volclose(struct afp_volume * volume);
+-
+-
+-int afp_setforkparms(struct afp_volume *volume,
+- unsigned short forkid, unsigned short bitmap, unsigned long len);
+-
+-int afp_byterangelock(struct afp_volume * volume,
+- unsigned char flag,
+- unsigned short forkid,
+- uint32_t offset,
+- uint32_t len, uint32_t *generated_offset);
+-
+-int afp_byterangelockext(struct afp_volume * volume,
+- unsigned char flag,
+- unsigned short forkid,
+- uint64_t offset,
+- uint64_t len, uint64_t *generated_offset);
+-
+-int afp_moveandrename(struct afp_volume *volume,
+- unsigned int src_did,
+- unsigned int dst_did,
+- char * src_path, char * dst_path, char *new_name);
+-
+-int afp_rename(struct afp_volume * volume,
+- unsigned int dirid,
+- char * path_from, char * path_to);
+-
+-int afp_listextattr(struct afp_volume * volume,
+- unsigned int dirid, unsigned short bitmap,
+- char * pathname, struct afp_extattr_info * info);
+-
+-/* This is a currently undocumented command */
+-int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data);
+-
+-/* For debugging */
+-char * afp_get_command_name(char code);
+-
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/afp_protocol.h afpfs-ng-0.8.1.patch/include/afp_protocol.h
+--- afpfs-ng-0.8.1/include/afp_protocol.h 2008-02-18 04:33:43.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,361 +0,0 @@
+-
+-#ifndef _AFP_PROTOCOL_H_
+-#define _AFP_PROTOCOL_H_
+-
+-#include <sys/types.h>
+-#include <stddef.h>
+-#include <unistd.h>
+-#include <stdint.h>
+-
+-/* This file defines constants for the Apple File Protocol.
+- All page references are from "Apple Filing Protocol Programming" version 3.2.
+- except where noted.
+-*/
+-
+-#define AFP_SERVER_NAME_LEN 33
+-#define AFP_SERVER_NAME_UTF8_LEN 255
+-#define AFP_VOLUME_NAME_LEN 33
+-#define AFP_VOLUME_NAME_UTF8_LEN 33
+-#define AFP_SIGNATURE_LEN 16
+-#define AFP_MACHINETYPE_LEN 33
+-#define AFP_LOGINMESG_LEN 200
+-#define AFP_VOLPASS_LEN 8
+-#define AFP_HOSTNAME_LEN 255
+-/* This is actually just a guess, and only used for appletalk */
+-#define AFP_ZONE_LEN 255
+-
+-#define AFP_SERVER_ICON_LEN 256
+-
+-
+-#define AFP_MAX_USERNAME_LEN 127
+-#define AFP_MAX_PASSWORD_LEN 127
+-
+-
+-/* This is the maximum length of any UAM string */
+-#define AFP_UAM_LENGTH 24
+-
+-/* This is the maximum length of any path description */
+-#define AFP_MAX_PATH 768
+-
+-#define AFP_VOL_FLAT 1
+-#define AFP_VOL_FIXED 2
+-#define AFP_VOL_VARIABLE 3
+-
+-/* The root directory ID, p.26 */
+-
+-#define AFP_ROOT_DID 2
+-
+-/* Path type constants, p.249 */
+-
+-enum {
+-kFPShortName = 1,
+-kFPLongName = 2,
+-kFPUTF8Name = 3
+-};
+-
+-/* fork types */
+-
+-#define AFP_FORKTYPE_DATA 0x0
+-#define AFP_FORKTYPE_RESOURCE 0x80
+-
+-/* openfork access modes, from p.196 */
+-
+-#define AFP_OPENFORK_ALLOWREAD 1
+-#define AFP_OPENFORK_ALLOWWRITE 2
+-#define AFP_OPENFORK_DENYREAD 0x10
+-#define AFP_OPENFORK_DENYWRITE 0x20
+-
+-/* Message type for getsrvmesg, p. 169*/
+-
+-typedef enum {
+- AFPMESG_LOGIN = 0,
+- AFPMESG_SERVER = 1
+-} afpmessage_t;
+-
+-/* Message bitmap for getsrvrmsg */
+-
+-#define AFP_GETSRVRMSG_UTF8 0x2
+-#define AFP_GETSRVRMSG_GETMSG 0x1
+-
+-
+-/* Maximum Version length, p.17 */
+-#define AFP_MAX_VERSION_LENGTH 16
+-
+-/* Maximum length of a token, this is undocumented */
+-#define AFP_TOKEN_MAX_LEN 256
+-
+-/* The maximum size of a file for AFP 2 */
+-#define AFP_MAX_AFP2_FILESIZE (4294967296)
+-
+-/* Unix privs, p.240 */
+-
+-struct afp_unixprivs {
+- uint32_t uid __attribute__((__packed__));
+- uint32_t gid __attribute__((__packed__));
+- uint32_t permissions __attribute__((__packed__));
+- uint32_t ua_permissions __attribute__((__packed__));
+-
+-};
+-
+-
+-/* AFP Volume attributes bitmap, p.241 */
+-
+-enum {
+- kReadOnly = 0x01,
+- kHasVolumePassword = 0x02,
+- kSupportsFileIDs = 0x04,
+- kSupportsCatSearch = 0x08,
+- kSupportsBlankAccessPrivs = 0x10,
+- kSupportsUnixPrivs = 0x20,
+- kSupportsUTF8Names = 0x40,
+- kNoNetworkUserIDs = 0x80,
+- kDefaultPrivsFromParent = 0x100,
+- kNoExchangeFiles = 0x200,
+- kSupportsExtAttrs = 0x400,
+- kSupportsACLs=0x800
+-};
+-
+-/* AFP file creation constantes, p.250 */
+-enum {
+-kFPSoftCreate = 0,
+-kFPHardCreate = 0x80
+-};
+-
+-/* AFP Directory attributes, taken from the protocol guide p.236 */
+-
+-enum {
+- kFPAttributeBit = 0x1,
+- kFPParentDirIDBit = 0x2,
+- kFPCreateDateBit = 0x4,
+- kFPModDateBit = 0x8,
+- kFPBackupDateBit = 0x10,
+- kFPFinderInfoBit = 0x20,
+- kFPLongNameBit = 0x40,
+- kFPShortNameBit = 0x80,
+- kFPNodeIDBit = 0x100,
+- kFPOffspringCountBit = 0x0200,
+- kFPOwnerIDBit = 0x0400,
+- kFPGroupIDBit = 0x0800,
+- kFPAccessRightsBit = 0x1000,
+- kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier
+- kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later
+- kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later
+-};
+-
+-/* AFP File bitmap, p.238. These are the ones not in the AFP Directory
+- attributes map. */
+-
+-enum {
+- kFPDataForkLenBit = 0x0200,
+- kFPRsrcForkLenBit = 0x0400,
+- kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later
+- kFPLaunchLimitBit = 0x1000,
+- kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later
+-};
+-
+-/* AFP Extended Attributes Bitmap, p.238 */
+-
+-enum {
+- kXAttrNoFollow = 0x1,
+- kXAttrCreate = 0x2,
+- kXAttrREplace=0x4
+-};
+-
+-
+-/* AFP function codes */
+-enum AFPFunction
+-{
+- afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork,
+- afpCopyFile, afpCreateDir, afpCreateFile,
+- afpDelete, afpEnumerate, afpFlush, afpFlushFork,
+- afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms,
+- afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID,
+- afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork,
+- afpRead, afpRename, afpSetDirParms, afpSetFileParms,
+- afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms,
+- afpSetFileDirParms, afpChangePassword,
+- afpGetUserInfo=37,afpGetSrvrMsg = 38,
+- afpOpenDT=48,
+- afpCloseDT=49,
+- afpGetIcon=51, afpGetIconInfo=52,
+- afpAddComment=56, afpRemoveComment=57, afpGetComment=58,
+- afpByteRangeLockExt=59, afpReadExt, afpWriteExt,
+- afpGetAuthMethods=62,
+- afp_LoginExt=63,
+- afpGetSessionToken=64,
+- afpDisconnectOldSession=65,
+- afpEnumerateExt=66,
+- afpCatSearchExt = 67,
+- afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr,
+- afpRemoveExtAttr , afpListExtAttrs,
+- afpZzzzz = 122,
+- afpAddIcon=192,
+-};
+-
+-/* AFP Volume bitmap. Take from 242 of the protocol guide. */
+-enum {
+- kFPBadVolPre222Bitmap = 0xFe00,
+- kFPBadVolBitmap = 0xF000,
+- kFPVolAttributeBit = 0x1,
+- kFPVolSignatureBit = 0x2,
+- kFPVolCreateDateBit = 0x4,
+- kFPVolModDateBit = 0x8,
+- kFPVolBackupDateBit = 0x10,
+- kFPVolIDBit = 0x20,
+- kFPVolBytesFreeBit = 0x40,
+- kFPVolBytesTotalBit = 0x80,
+- kFPVolNameBit = 0x100,
+- kFPVolExtBytesFreeBit = 0x200,
+- kFPVolExtBytesTotalBit = 0x400,
+- kFPVolBlockSizeBit = 0x800
+-};
+-
+-/* AFP Attention Codes -- 4 bits */
+-#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */
+-#define AFPATTN_CRASH (1 << 14) /* server crashed */
+-#define AFPATTN_MESG (1 << 13) /* server has message */
+-#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */
+-/* server notification */
+-#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT)
+-
+-/* extended bitmap -- 12 bits. volchanged is only useful w/ a server
+- * notification, and time is only useful for shutdown. */
+-#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */
+-#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */
+-
+-#define kFPNoErr 0
+-
+-/* AFP result codes, p252 */
+-#define kASPSessClosed -1072
+-#define kFPAccessDenied -5000
+-#define kFPAuthContinue -5001
+-#define kFPBadUAM -5002
+-#define kFPBadVersNum -5003
+-#define kFPBitmapErr -5004
+-#define kFPCantMove -5005
+-#define kFPDenyConflict -5006
+-#define kFPDirNotEmpty -5007
+-#define kFPDiskFull -5008
+-#define kFPEOFErr -5009
+-#define kFPFileBusy -5010
+-#define kFPFlatVol -5011
+-#define kFPItemNotFound -5012
+-#define kFPLockErr -5013
+-#define kFPMiscErr -5014
+-#define kFPNoMoreLocks -5015
+-#define kFPNoServer -5016
+-#define kFPObjectExists -5017
+-#define kFPObjectNotFound -5018
+-#define kFPParamErr -5019
+-#define kFPRangeNotLocked -5020
+-#define kFPRangeOverlap -5021
+-#define kFPSessClosed -5022
+-#define kFPUserNotAuth -5023
+-#define kFPCallNotSupported -5024
+-#define kFPObjectTypeErr -5025
+-#define kFPTooManyFilesOpen -5026
+-#define kFPServerGoingDown -5027
+-#define kFPCantRename -5028
+-#define kFPDirNotFound -5029
+-#define kFPIconTypeError -5030
+-#define kFPVolLocked -5031
+-#define kFPObjectLocked -5032
+-#define kFPContainsSharedErr -5033
+-#define kFPIDNotFound -5034
+-#define kFPIDExists -5035
+-#define kFPDiffVolErr -5036
+-#define kFPCatalogChanged -5037
+-#define kFPSameObjectErr -5038
+-#define kFPBadIDErr -5039
+-#define kFPPwdSameErr -5040
+-#define kFPPwdTooShortErr -5041
+-#define kFPPwdExpiredErr -5042
+-#define kFPInsideSharedErr -5043
+-#define kFPInsideTrashErr -5044
+-#define kFPPwdNeedsChangeErr -5045
+-#define kFPPwdPolicyErr -5046
+-#define kFPDiskQuotaExceeded –5047
+-
+-
+-
+-/* These flags determine to lock or unlock in ByteRangeLock(Ext) */
+-
+-enum {
+-ByteRangeLock_Lock = 0,
+-ByteRangeLock_Unlock = 1
+-};
+-
+-/* These flags are used in volopen and getsrvrparm replies, p.171 */
+-
+-#define HasConfigInfo 0x1
+-#define HasPassword 0x80
+-
+-/* These are the subfunction for kFPMapID, as per p.248 */
+-
+-enum {
+-kUserIDToName = 1,
+-kGroupIDToName = 2,
+-kUserIDToUTF8Name = 3,
+-kGroupIDToUTF8Name = 4,
+-kUserUUIDToUTF8Name = 5,
+-kGroupUUIDToUTF8Name = 6
+-};
+-
+-
+-/* These are the subfunction flags described in the FPMapName command, p.286.
+- Note that this is different than what's described on p. 186. */
+-
+-enum {
+-kNameToUserID = 1,
+-kNameToGroupID = 2,
+-kUTF8NameToUserID = 3,
+-kUTF8NameToGroupID = 4,
+-kUTF8NameToUserUUID = 5,
+-kUTF8NameToGroupUUID = 6
+-};
+-
+-/* These are bits for FPGetUserInfo, p.173. */
+-#define kFPGetUserInfo_USER_ID 1
+-#define kFPGetUserInfo_PRI_GROUPID 2
+-
+-/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */
+-
+-enum {
+- kSupportsCopyfile = 0x01,
+- kSupportsChgPwd = 0x02,
+- kDontAllowSavePwd = 0x04,
+- kSupportsSrvrMsg = 0x08,
+- kSrvrSig = 0x10,
+- kSupportsTCP = 0x20,
+- kSupportsSrvrNotify = 0x40,
+- kSupportsReconnect = 0x80,
+- kSupportsDirServices = 0x100,
+- kSupportsUTF8SrvrName = 0x200,
+- kSupportsUUIDs = 0x400,
+- kSupportsSuperClient = 0x8000
+-};
+-
+-
+-/* p.247 */
+-
+-enum {
+- kLoginWithoutID = 0,
+- kLoginWithID = 1,
+- kReconnWithID = 2,
+- kLoginWithTimeAndID = 3,
+- kReconnWithTimeAndID = 4,
+- kRecon1Login = 5,
+- kRecon1ReconnectLogin = 6,
+- kRecon1Refresh = 7, kGetKerberosSessionKey = 8
+-};
+-
+-
+-#define AFP_CHMOD_ALLOWED_BITS_22 \
+- (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG )
+-
+-
+-#endif
+-
+-
+-
+-
+diff -Naur afpfs-ng-0.8.1/include/codepage.h afpfs-ng-0.8.1.patch/include/codepage.h
+--- afpfs-ng-0.8.1/include/codepage.h 2007-09-23 16:21:30.000000000 +0200
++++ afpfs-ng-0.8.1.patch/include/codepage.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,11 +0,0 @@
+-#ifndef __CODE_PAGE_H_
+-#define __CODE_PAGE_H_
+-int convert_utf8dec_to_utf8pre(const char *src, int src_len,
+- char * dest, int dest_len);
+-int convert_utf8pre_to_utf8dec(const char * src, int src_len,
+- char * dest, int dest_len);
+-int convert_path_to_unix(char encoding, char * dest,
+- char * src, int dest_len);
+-int convert_path_to_afp(char encoding, char * dest,
+- char * src, int dest_len);
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/dsi.h afpfs-ng-0.8.1.patch/include/dsi.h
+--- afpfs-ng-0.8.1/include/dsi.h 2008-02-18 04:33:24.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/dsi.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,33 +0,0 @@
+-
+-#ifndef __DSI_H_
+-#define __DSI_H_
+-
+-#include "afp.h"
+-
+-struct dsi_request
+-{
+- unsigned short requestid;
+- unsigned char subcommand;
+- void * other;
+- unsigned char wait;
+- pthread_cond_t condition_cond;
+- struct dsi_request * next;
+- int return_code;
+-};
+-
+-int dsi_receive(struct afp_server * server, void * data, int size);
+-int dsi_getstatus(struct afp_server * server);
+-
+-int dsi_opensession(struct afp_server *server);
+-
+-int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other);
+-struct dsi_session * dsi_create(struct afp_server *server);
+-int dsi_restart(struct afp_server *server);
+-int dsi_recv(struct afp_server * server);
+-
+-#define DSI_BLOCK_TIMEOUT -1
+-#define DSI_DONT_WAIT 0
+-#define DSI_DEFAULT_TIMEOUT 5
+-
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/libafpclient.h afpfs-ng-0.8.1.patch/include/libafpclient.h
+--- afpfs-ng-0.8.1/include/libafpclient.h 2008-01-30 05:37:59.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/libafpclient.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,50 +0,0 @@
+-
+-#ifndef __CLIENT_H_
+-#define __CLIENT_H_
+-
+-#include <unistd.h>
+-#include <syslog.h>
+-
+-#define MAX_CLIENT_RESPONSE 2048
+-
+-
+-enum loglevels {
+- AFPFSD,
+-};
+-
+-struct afp_server;
+-struct afp_volume;
+-
+-struct libafpclient {
+- int (*unmount_volume) (struct afp_volume * volume);
+- void (*log_for_client)(void * priv,
+- enum loglevels loglevel, int logtype, const char *message);
+- void (*forced_ending_hook)(void);
+- int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd);
+- void (*loop_started)(void);
+-} ;
+-
+-extern struct libafpclient * libafpclient;
+-
+-void libafpclient_register(struct libafpclient * tmpclient);
+-
+-
+-void signal_main_thread(void);
+-
+-/* These are logging functions */
+-
+-#define MAXLOGSIZE 2048
+-
+-#define LOG_METHOD_SYSLOG 1
+-#define LOG_METHOD_STDOUT 2
+-
+-void set_log_method(int m);
+-
+-
+-void log_for_client(void * priv,
+- enum loglevels loglevel, int logtype, char * message,...);
+-
+-void stdout_log_for_client(void * priv,
+- enum loglevels loglevel, int logtype, const char *message);
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/Makefile.am afpfs-ng-0.8.1.patch/include/Makefile.am
+--- afpfs-ng-0.8.1/include/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/Makefile.am 2011-09-10 12:13:50.126124692 +0200
+@@ -0,0 +1,3 @@
++## Process this file with automake to produce Makefile.in
++
++SUBDIRS = afpfs-ng
+diff -Naur afpfs-ng-0.8.1/include/map_def.h afpfs-ng-0.8.1.patch/include/map_def.h
+--- afpfs-ng-0.8.1/include/map_def.h 2008-01-17 05:55:46.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/map_def.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,15 +0,0 @@
+-#ifndef __MAP_H_
+-#define __MAP_H_
+-
+-#include "afp.h"
+-
+-#define AFP_MAPPING_UNKNOWN 0
+-#define AFP_MAPPING_COMMON 1
+-#define AFP_MAPPING_LOGINIDS 2
+-#define AFP_MAPPING_NAME 3
+-
+-unsigned int map_string_to_num(char * name);
+-char * get_mapping_name(struct afp_volume * volume);
+-
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/midlevel.h afpfs-ng-0.8.1.patch/include/midlevel.h
+--- afpfs-ng-0.8.1/include/midlevel.h 2007-12-24 20:39:25.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/midlevel.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,64 +0,0 @@
+-#ifndef __MIDLEVEL_H_
+-#define __MIDLEVEL_H_
+-
+-#include <utime.h>
+-#include "afp.h"
+-
+-int ml_open(struct afp_volume * volume, const char *path, int flags,
+- struct afp_file_info **newfp);
+-
+-int ml_creat(struct afp_volume * volume, const char *path,mode_t mode);
+-
+-int ml_readdir(struct afp_volume * volume,
+- const char *path,
+- struct afp_file_info **base);
+-
+-int ml_read(struct afp_volume * volume, const char *path,
+- char *buf, size_t size, off_t offset,
+- struct afp_file_info *fp, int * eof);
+-
+-int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode);
+-
+-int ml_unlink(struct afp_volume * vol, const char *path);
+-
+-int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode);
+-
+-int ml_close(struct afp_volume * volume, const char * path,
+- struct afp_file_info * fp);
+-
+-int ml_getattr(struct afp_volume * volume, const char *path,
+- struct stat *stbuf);
+-
+-int ml_write(struct afp_volume * volume, const char * path,
+- const char *data, size_t size, off_t offset,
+- struct afp_file_info * fp, uid_t uid,
+- gid_t gid);
+-
+-int ml_readlink(struct afp_volume * vol, const char * path,
+- char *buf, size_t size);
+-
+-int ml_rmdir(struct afp_volume * vol, const char *path);
+-
+-int ml_chown(struct afp_volume * vol, const char * path,
+- uid_t uid, gid_t gid);
+-
+-int ml_truncate(struct afp_volume * vol, const char * path, off_t offset);
+-
+-int ml_utime(struct afp_volume * vol, const char * path,
+- struct utimbuf * timebuf);
+-
+-int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2);
+-
+-int ml_rename(struct afp_volume * vol,
+- const char * path_from, const char * path_to);
+-
+-int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat);
+-
+-void afp_ml_filebase_free(struct afp_file_info **filebase);
+-
+-int ml_passwd(struct afp_server *server,
+- char * username, char * oldpasswd, char * newpasswd);
+-
+-
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/uams_def.h afpfs-ng-0.8.1.patch/include/uams_def.h
+--- afpfs-ng-0.8.1/include/uams_def.h 2007-09-07 15:10:51.000000000 +0200
++++ afpfs-ng-0.8.1.patch/include/uams_def.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,16 +0,0 @@
+-#ifndef __UAM_DEFS_H_
+-#define __UAM_DEFS_H_
+-
+-#define UAM_NOUSERAUTHENT 0x1
+-#define UAM_CLEARTXTPASSWRD 0x2
+-#define UAM_RANDNUMEXCHANGE 0x4
+-#define UAM_2WAYRANDNUM 0x8
+-#define UAM_DHCAST128 0x10
+-#define UAM_CLIENTKRB 0x20
+-#define UAM_DHX2 0x40
+-#define UAM_RECON1 0x80
+-
+-int uam_string_to_bitmap(char * name);
+-char * uam_bitmap_to_string(unsigned int bitmap);
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/include/utils.h afpfs-ng-0.8.1.patch/include/utils.h
+--- afpfs-ng-0.8.1/include/utils.h 2008-02-18 04:33:58.000000000 +0100
++++ afpfs-ng-0.8.1.patch/include/utils.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,43 +0,0 @@
+-#ifndef __UTILS_H_
+-#define __UTILS_H_
+-#include <stdio.h>
+-
+-#include "afp.h"
+-
+-#if BYTE_ORDER == BIG_ENDIAN
+-#define hton64(x) (x)
+-#define ntoh64(x) (x)
+-#else /* BYTE_ORDER == BIG_ENDIAN */
+-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
+- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32))
+-#define ntoh64(x) (hton64(x))
+-#endif /* BYTE_ORDER == BIG_ENDIAN */
+-
+-#define min(a,b) (((a)<(b)) ? (a) : (b))
+-#define max(a,b) (((a)>(b)) ? (a) : (b))
+-
+-
+-
+-unsigned char unixpath_to_afppath(
+- struct afp_server * server,
+- char * buf);
+-
+-unsigned char sizeof_path_header(struct afp_server * server);
+-
+-
+-
+-unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ;
+-unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len);
+-
+-unsigned char copy_to_pascal(char *dest, const char *src);
+-unsigned short copy_to_pascal_two(char *dest, const char *src);
+-
+-void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len);
+-
+-
+-char * create_path(struct afp_server * server, char * pathname, unsigned short * len);
+-
+-
+-int invalid_filename(struct afp_server * server, const char * filename);
+-
+-#endif
+diff -Naur afpfs-ng-0.8.1/lib/afp.c afpfs-ng-0.8.1.patch/lib/afp.c
+--- afpfs-ng-0.8.1/lib/afp.c 2008-03-08 03:44:16.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/afp.c 2011-09-10 12:13:50.131124759 +0200
+@@ -9,7 +9,7 @@
+
+
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+ #include <config.h>
+
+ #include <stdio.h>
+@@ -21,17 +21,17 @@
+ #include <sys/socket.h>
+ #include <errno.h>
+
+-#include "afp_protocol.h"
+-#include "libafpclient.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/libafpclient.h"
+ #include "server.h"
+-#include "dsi.h"
++#include "afpfs-ng/dsi.h"
+ #include "dsi_protocol.h"
+-#include "utils.h"
++#include "afpfs-ng/utils.h"
+ #include "afp_replies.h"
+ #include "afp_internal.h"
+ #include "did.h"
+ #include "forklist.h"
+-#include "codepage.h"
++#include "afpfs-ng/codepage.h"
+
+ struct afp_versions afp_versions[] = {
+ { "AFPVersion 1.1", 11 },
+diff -Naur afpfs-ng-0.8.1/lib/afp_internal.h afpfs-ng-0.8.1.patch/lib/afp_internal.h
+--- afpfs-ng-0.8.1/lib/afp_internal.h 2007-11-09 05:27:20.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/afp_internal.h 2011-09-10 12:13:50.132124772 +0200
+@@ -1,7 +1,7 @@
+ #ifndef _AFP_INTERNAL_H_
+ #define _AFP_INTERNAL_H_
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ extern struct afp_versions afp_versions[];
+
+diff -Naur afpfs-ng-0.8.1/lib/afp_url.c afpfs-ng-0.8.1.patch/lib/afp_url.c
+--- afpfs-ng-0.8.1/lib/afp_url.c 2008-03-04 21:16:49.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/afp_url.c 2011-09-10 12:13:50.132124772 +0200
+@@ -3,7 +3,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ void afp_default_url(struct afp_url *url)
+ {
+diff -Naur afpfs-ng-0.8.1/lib/client.c afpfs-ng-0.8.1.patch/lib/client.c
+--- afpfs-ng-0.8.1/lib/client.c 2008-02-18 04:36:30.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/client.c 2011-09-10 12:13:50.132124772 +0200
+@@ -1,5 +1,5 @@
+-#include <afp.h>
+-#include <libafpclient.h>
++#include <afpfs-ng/afp.h>
++#include <afpfs-ng/libafpclient.h>
+
+
+ struct libafpclient * libafpclient = NULL;
+diff -Naur afpfs-ng-0.8.1/lib/codepage.c afpfs-ng-0.8.1.patch/lib/codepage.c
+--- afpfs-ng-0.8.1/lib/codepage.c 2008-02-18 04:36:54.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/codepage.c 2011-09-10 12:13:50.133124786 +0200
+@@ -14,8 +14,8 @@
+
+ #include <string.h>
+ #include <stdlib.h>
+-#include "afp_protocol.h"
+-#include "utils.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/utils.h"
+ #include "unicode.h"
+
+ int convert_utf8dec_to_utf8pre(const char *src, int src_len,
+diff -Naur afpfs-ng-0.8.1/lib/connect.c afpfs-ng-0.8.1.patch/lib/connect.c
+--- afpfs-ng-0.8.1/lib/connect.c 2008-02-18 04:38:59.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/connect.c 2011-09-10 12:13:50.133124786 +0200
+@@ -10,13 +10,13 @@
+ #include <string.h>
+ #include <sys/socket.h>
+
+-#include "afp.h"
+-#include "dsi.h"
+-#include "utils.h"
+-#include "uams_def.h"
+-#include "codepage.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/uams_def.h"
++#include "afpfs-ng/codepage.h"
+ #include "users.h"
+-#include "libafpclient.h"
++#include "afpfs-ng/libafpclient.h"
+ #include "server.h"
+
+
+diff -Naur afpfs-ng-0.8.1/lib/did.c afpfs-ng-0.8.1.patch/lib/did.c
+--- afpfs-ng-0.8.1/lib/did.c 2008-02-18 04:39:17.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/did.c 2011-09-10 12:13:50.133124786 +0200
+@@ -9,8 +9,8 @@
+ #include <string.h>
+ #include <stdio.h>
+
+-#include "afp.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/afp_protocol.h"
+
+ #undef DID_CACHE_DISABLE
+
+diff -Naur afpfs-ng-0.8.1/lib/dsi.c afpfs-ng-0.8.1.patch/lib/dsi.c
+--- afpfs-ng-0.8.1/lib/dsi.c 2008-02-18 04:53:03.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/dsi.c 2011-09-10 12:13:50.134124800 +0200
+@@ -19,12 +19,12 @@
+ #include <signal.h>
+ #include <iconv.h>
+
+-#include "utils.h"
+-#include "dsi.h"
+-#include "afp.h"
+-#include "uams_def.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/uams_def.h"
+ #include "dsi_protocol.h"
+-#include "libafpclient.h"
++#include "afpfs-ng/libafpclient.h"
+ #include "afp_internal.h"
+ #include "afp_replies.h"
+
+diff -Naur afpfs-ng-0.8.1/lib/forklist.c afpfs-ng-0.8.1.patch/lib/forklist.c
+--- afpfs-ng-0.8.1/lib/forklist.c 2008-01-17 05:49:16.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/forklist.c 2011-09-10 12:13:50.135124814 +0200
+@@ -10,7 +10,7 @@
+ */
+
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ #include <stdlib.h>
+ #include <pthread.h>
+diff -Naur afpfs-ng-0.8.1/lib/log.c afpfs-ng-0.8.1.patch/lib/log.c
+--- afpfs-ng-0.8.1/lib/log.c 2008-01-30 05:37:58.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/log.c 2011-09-10 12:13:50.135124814 +0200
+@@ -3,7 +3,7 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include "libafpclient.h"
++#include "afpfs-ng/libafpclient.h"
+
+ void log_for_client(void * priv,
+ enum loglevels loglevel, int logtype, char *format, ...) {
+diff -Naur afpfs-ng-0.8.1/lib/loop.c afpfs-ng-0.8.1.patch/lib/loop.c
+--- afpfs-ng-0.8.1/lib/loop.c 2008-02-18 04:40:11.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/loop.c 2011-09-10 12:13:50.135124814 +0200
+@@ -16,9 +16,9 @@
+ #include <sys/time.h>
+ #include <signal.h>
+
+-#include "afp.h"
+-#include "dsi.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/utils.h"
+
+ #define SIGNAL_TO_USE SIGUSR2
+
+diff -Naur afpfs-ng-0.8.1/lib/lowlevel.c afpfs-ng-0.8.1.patch/lib/lowlevel.c
+--- afpfs-ng-0.8.1/lib/lowlevel.c 2008-02-20 02:33:17.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/lowlevel.c 2011-09-10 12:13:50.136124828 +0200
+@@ -19,10 +19,10 @@
+ #else
+ #include <fcntl.h>
+ #endif
+-#include "afp.h"
+-#include "afp_protocol.h"
+-#include "codepage.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/codepage.h"
++#include "afpfs-ng/utils.h"
+ #include "did.h"
+ #include "users.h"
+
+diff -Naur afpfs-ng-0.8.1/lib/map_def.c afpfs-ng-0.8.1.patch/lib/map_def.c
+--- afpfs-ng-0.8.1/lib/map_def.c 2007-09-07 15:10:59.000000000 +0200
++++ afpfs-ng-0.8.1.patch/lib/map_def.c 2011-09-10 12:13:50.136124828 +0200
+@@ -1,6 +1,6 @@
+ #include <string.h>
+-#include "afp.h"
+-#include "map_def.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/map_def.h"
+
+ static char *afp_map_strings[] = {
+ "Unknown",
+diff -Naur afpfs-ng-0.8.1/lib/meta.c afpfs-ng-0.8.1.patch/lib/meta.c
+--- afpfs-ng-0.8.1/lib/meta.c 2008-01-04 04:52:44.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/meta.c 2011-09-10 12:13:50.137124841 +0200
+@@ -17,10 +17,10 @@
+ #include <unistd.h>
+ #include <sys/time.h>
+
+-#include "afp.h"
+-#include "dsi.h"
+-#include "afp_protocol.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/utils.h"
+
+
+ int afp_meta_getattr(const char *path, struct stat *stbuf)
+diff -Naur afpfs-ng-0.8.1/lib/midlevel.c afpfs-ng-0.8.1.patch/lib/midlevel.c
+--- afpfs-ng-0.8.1/lib/midlevel.c 2008-03-08 17:08:18.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/midlevel.c 2011-09-10 12:13:50.160125150 +0200
+@@ -10,7 +10,7 @@
+ */
+
+
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+
+ #include <sys/stat.h>
+ #include <string.h>
+@@ -28,9 +28,9 @@
+ #include "users.h"
+ #include "did.h"
+ #include "resource.h"
+-#include "utils.h"
+-#include "codepage.h"
+-#include "midlevel.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/codepage.h"
++#include "afpfs-ng/midlevel.h"
+ #include "afp_internal.h"
+ #include "forklist.h"
+ #include "uams.h"
+diff -Naur afpfs-ng-0.8.1/lib/proto_attr.c afpfs-ng-0.8.1.patch/lib/proto_attr.c
+--- afpfs-ng-0.8.1/lib/proto_attr.c 2008-01-30 05:37:58.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_attr.c 2011-09-10 12:13:50.168125257 +0200
+@@ -7,10 +7,10 @@
+
+ #include <string.h>
+ #include <stdlib.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/afp_protocol.h"
+ #include "dsi_protocol.h"
+
+ /* This is a new command, function 76. There are currently no docs, so this
+diff -Naur afpfs-ng-0.8.1/lib/proto_desktop.c afpfs-ng-0.8.1.patch/lib/proto_desktop.c
+--- afpfs-ng-0.8.1/lib/proto_desktop.c 2008-02-18 04:44:11.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_desktop.c 2011-09-10 12:13:50.168125257 +0200
+@@ -9,10 +9,10 @@
+ #include <string.h>
+ #include <stdlib.h>
+
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/afp_protocol.h"
+ #include "dsi_protocol.h"
+
+ /* closedt, addicon, geticoninfo, addappl, removeappl */
+diff -Naur afpfs-ng-0.8.1/lib/proto_directory.c afpfs-ng-0.8.1.patch/lib/proto_directory.c
+--- afpfs-ng-0.8.1/lib/proto_directory.c 2008-02-19 03:39:29.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_directory.c 2011-09-10 12:13:50.168125257 +0200
+@@ -9,10 +9,10 @@
+ #include <string.h>
+ #include <stdlib.h>
+
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/afp_protocol.h"
+ #include "dsi_protocol.h"
+ #include "afp_replies.h"
+
+diff -Naur afpfs-ng-0.8.1/lib/proto_files.c afpfs-ng-0.8.1.patch/lib/proto_files.c
+--- afpfs-ng-0.8.1/lib/proto_files.c 2008-02-18 04:46:18.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_files.c 2011-09-10 12:13:50.169125270 +0200
+@@ -8,11 +8,11 @@
+
+ #include <stdlib.h>
+ #include <string.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "dsi_protocol.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp_protocol.h"
+ #include "afp_internal.h"
+
+ /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably
+diff -Naur afpfs-ng-0.8.1/lib/proto_fork.c afpfs-ng-0.8.1.patch/lib/proto_fork.c
+--- afpfs-ng-0.8.1/lib/proto_fork.c 2008-01-30 05:37:58.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_fork.c 2011-09-10 12:13:50.169125270 +0200
+@@ -9,11 +9,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "dsi_protocol.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp_protocol.h"
+
+ int afp_setforkparms(struct afp_volume * volume,
+ unsigned short forkid, unsigned short bitmap, unsigned long len)
+diff -Naur afpfs-ng-0.8.1/lib/proto_login.c afpfs-ng-0.8.1.patch/lib/proto_login.c
+--- afpfs-ng-0.8.1/lib/proto_login.c 2008-01-30 05:37:59.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_login.c 2011-09-10 12:13:50.169125270 +0200
+@@ -10,10 +10,10 @@
+
+ #include <stdlib.h>
+ #include <string.h>
+-#include "dsi.h"
++#include "afpfs-ng/dsi.h"
+ #include "dsi_protocol.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "afp_internal.h"
+
+
+diff -Naur afpfs-ng-0.8.1/lib/proto_map.c afpfs-ng-0.8.1.patch/lib/proto_map.c
+--- afpfs-ng-0.8.1/lib/proto_map.c 2008-01-30 05:37:59.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_map.c 2011-09-10 12:13:50.170125283 +0200
+@@ -9,11 +9,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "dsi_protocol.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp_protocol.h"
+
+ /* This is used to pass the return values back from afp_getuserinfo_reply() */
+ struct uidgid {
+diff -Naur afpfs-ng-0.8.1/lib/proto_replyblock.c afpfs-ng-0.8.1.patch/lib/proto_replyblock.c
+--- afpfs-ng-0.8.1/lib/proto_replyblock.c 2008-02-18 04:46:19.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_replyblock.c 2011-09-10 12:13:50.170125283 +0200
+@@ -6,9 +6,9 @@
+ */
+
+ #include <string.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "afp_internal.h"
+
+
+diff -Naur afpfs-ng-0.8.1/lib/proto_server.c afpfs-ng-0.8.1.patch/lib/proto_server.c
+--- afpfs-ng-0.8.1/lib/proto_server.c 2008-02-19 02:56:21.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_server.c 2011-09-10 12:13:50.170125283 +0200
+@@ -7,12 +7,12 @@
+ */
+ #include <stdlib.h>
+ #include <string.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "dsi_protocol.h"
+-#include "afp_protocol.h"
+-#include "codepage.h"
++#include "afpfs-ng/afp_protocol.h"
++#include "afpfs-ng/codepage.h"
+ #include "afp_internal.h"
+
+ int afp_getsrvrparms(struct afp_server *server)
+diff -Naur afpfs-ng-0.8.1/lib/proto_session.c afpfs-ng-0.8.1.patch/lib/proto_session.c
+--- afpfs-ng-0.8.1/lib/proto_session.c 2008-02-18 04:46:19.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_session.c 2011-09-10 12:13:50.170125283 +0200
+@@ -8,10 +8,10 @@
+ */
+ #include <stdlib.h>
+ #include <string.h>
+-#include "dsi.h"
++#include "afpfs-ng/dsi.h"
+ #include "dsi_protocol.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+
+ int afp_getsessiontoken(struct afp_server * server, int type,
+ unsigned int timestamp, struct afp_token *outgoing_token,
+diff -Naur afpfs-ng-0.8.1/lib/proto_volume.c afpfs-ng-0.8.1.patch/lib/proto_volume.c
+--- afpfs-ng-0.8.1/lib/proto_volume.c 2008-02-18 04:47:48.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/proto_volume.c 2011-09-10 12:13:50.171125296 +0200
+@@ -8,13 +8,13 @@
+
+ #include <string.h>
+ #include <stdlib.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "dsi_protocol.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp_protocol.h"
+ #include "afp_internal.h"
+-#include "codepage.h"
++#include "afpfs-ng/codepage.h"
+
+ static int parse_volbitmap_reply(struct afp_server * server,
+ struct afp_volume * tmpvol,
+diff -Naur afpfs-ng-0.8.1/lib/resource.c afpfs-ng-0.8.1.patch/lib/resource.c
+--- afpfs-ng-0.8.1/lib/resource.c 2008-02-18 04:46:56.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/resource.c 2011-09-10 12:13:50.171125296 +0200
+@@ -3,11 +3,11 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include "afp.h"
++#include "afpfs-ng/afp.h"
+ #include "resource.h"
+ #include "lowlevel.h"
+ #include "did.h"
+-#include "midlevel.h"
++#include "afpfs-ng/midlevel.h"
+
+ #define appledouble ".AppleDouble"
+ #define finderinfo_string ".finderinfo"
+diff -Naur afpfs-ng-0.8.1/lib/server.c afpfs-ng-0.8.1.patch/lib/server.c
+--- afpfs-ng-0.8.1/lib/server.c 2008-02-19 02:56:21.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/server.c 2011-09-10 12:13:50.172125310 +0200
+@@ -8,15 +8,15 @@
+ #include <string.h>
+ #include <time.h>
+
+-#include "afp.h"
+-#include "dsi.h"
+-#include "utils.h"
+-#include "uams_def.h"
+-#include "codepage.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/uams_def.h"
++#include "afpfs-ng/codepage.h"
+ #include "users.h"
+-#include "libafpclient.h"
++#include "afpfs-ng/libafpclient.h"
+ #include "afp_internal.h"
+-#include "dsi.h"
++#include "afpfs-ng/dsi.h"
+
+
+ struct afp_server * afp_server_complete_connection(
+diff -Naur afpfs-ng-0.8.1/lib/status.c afpfs-ng-0.8.1.patch/lib/status.c
+--- afpfs-ng-0.8.1/lib/status.c 2008-03-08 17:08:38.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/status.c 2011-09-10 12:13:50.172125310 +0200
+@@ -1,8 +1,8 @@
+ #include <string.h>
+ #include <stdio.h>
+-#include "map_def.h"
+-#include "dsi.h"
+-#include "afp.h"
++#include "afpfs-ng/map_def.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
+
+ int afp_status_header(char * text, int * len)
+ {
+diff -Naur afpfs-ng-0.8.1/lib/uams.c afpfs-ng-0.8.1.patch/lib/uams.c
+--- afpfs-ng-0.8.1/lib/uams.c 2008-01-04 04:52:44.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/uams.c 2011-09-10 12:13:50.173125324 +0200
+@@ -8,10 +8,10 @@
+
+ #include <string.h>
+ #include <stdlib.h>
+-#include "dsi.h"
+-#include "afp.h"
+-#include "utils.h"
+-#include "uams_def.h"
++#include "afpfs-ng/dsi.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
++#include "afpfs-ng/uams_def.h"
+ #include "config.h"
+
+ #ifdef HAVE_LIBGCRYPT
+diff -Naur afpfs-ng-0.8.1/lib/users.c afpfs-ng-0.8.1.patch/lib/users.c
+--- afpfs-ng-0.8.1/lib/users.c 2008-02-18 04:48:56.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/users.c 2011-09-10 12:13:50.174125338 +0200
+@@ -3,8 +3,8 @@
+ #include <grp.h>
+ #include <string.h>
+
+-#include "afp.h"
+-#include "map_def.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/map_def.h"
+
+ /* How mapping works
+ *
+diff -Naur afpfs-ng-0.8.1/lib/utils.c afpfs-ng-0.8.1.patch/lib/utils.c
+--- afpfs-ng-0.8.1/lib/utils.c 2008-02-18 04:53:37.000000000 +0100
++++ afpfs-ng-0.8.1.patch/lib/utils.c 2011-09-10 12:13:50.174125338 +0200
+@@ -8,10 +8,10 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include "afp.h"
+-#include "utils.h"
++#include "afpfs-ng/afp.h"
++#include "afpfs-ng/utils.h"
+ #include "afp_internal.h"
+-#include "afp_protocol.h"
++#include "afpfs-ng/afp_protocol.h"
+
+ struct afp_path_header_long {
+ unsigned char type;
+diff -Naur afpfs-ng-0.8.1/Makefile.am afpfs-ng-0.8.1.patch/Makefile.am
+--- afpfs-ng-0.8.1/Makefile.am 2008-02-18 04:24:14.000000000 +0100
++++ afpfs-ng-0.8.1.patch/Makefile.am 2011-09-10 12:13:50.176125365 +0200
+@@ -1,5 +1,5 @@
+ if HAVE_LIBFUSE
+-SUBDIRS = lib fuse cmdline docs
++SUBDIRS = lib fuse cmdline include docs
+ else
+-SUBDIRS = lib cmdline docs
++SUBDIRS = lib cmdline include docs
+ endif
diff --git a/abs/extra/community/flashplugin/PKGBUILD b/abs/extra/community/flashplugin/PKGBUILD
index 53ded26..92a7caa 100644
--- a/abs/extra/community/flashplugin/PKGBUILD
+++ b/abs/extra/community/flashplugin/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 150281 2012-02-16 09:18:00Z ibiru $
+# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=flashplugin
_licensefile='PlatformClients_PC_WWEULA_Combined_20100108_1657.pdf'
-pkgver=11.1.102.62
+pkgver=11.2.202.228
pkgrel=1
pkgdesc='Adobe Flash Player'
url='http://get.adobe.com/flashplayer'
@@ -21,14 +21,14 @@ if [ "$CARCH" = "i686" ]; then
source=("http://fpdownload.macromedia.com/get/flashplayer/pdc/$pkgver/install_flash_player_11_linux.i386.tar.gz"
"http://www.adobe.com/products/eulas/pdfs/${_licensefile}"
mms.cfg)
- md5sums=('c73d490e552e92016d53247a869ce64b'
+ md5sums=('174a9e778a11559d65f66290b16e2088'
'94ca2aecb409abfe36494d1a7ec7591d'
'f34aae6279b40e0bd2abfb0d9963d7b8')
elif [ "$CARCH" = "x86_64" ]; then
source=("http://fpdownload.macromedia.com/get/flashplayer/pdc/$pkgver/install_flash_player_11_linux.x86_64.tar.gz"
"http://www.adobe.com/products/eulas/pdfs/${_licensefile}"
mms.cfg)
- md5sums=('76be6fe21f68684c19ccee138a42fff9'
+ md5sums=('01e4ddb6e87ea8439f4955e83422f82e'
'94ca2aecb409abfe36494d1a7ec7591d'
'f34aae6279b40e0bd2abfb0d9963d7b8')
fi
@@ -51,6 +51,6 @@ package () {
install -Dm644 "${_licensefile}" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.pdf"
install -Dm644 "$srcdir/mms.cfg" "$pkgdir/etc/adobe/mms.cfg"
}
-md5sums=('c73d490e552e92016d53247a869ce64b'
+md5sums=('174a9e778a11559d65f66290b16e2088'
'94ca2aecb409abfe36494d1a7ec7591d'
'f34aae6279b40e0bd2abfb0d9963d7b8')
diff --git a/abs/extra/community/libcec/PKGBUILD b/abs/extra/community/libcec/PKGBUILD
new file mode 100644
index 0000000..e4b9821
--- /dev/null
+++ b/abs/extra/community/libcec/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id$
+# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+# Contributor: Philippe Cherel <philippe.cherel@mayenne.org>
+
+pkgname=libcec
+pkgver=1.5.2
+pkgrel=1
+pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter"
+arch=('i686' 'x86_64')
+url="https://github.com/Pulse-Eight/libcec"
+license=('GPL')
+depends=('udev')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/Pulse-Eight/libcec/tarball/$pkgname-$pkgver")
+_srcfolder=Pulse-Eight-libcec-00a02d1
+sha256sums=('93990024d01da7c66e2c78ca23919fd83137f6b944a2dc82fb5cc6d58a46742f')
+options=(!libtool)
+
+build() {
+ mv "$_srcfolder" "$pkgname-$pkgver"
+
+ cd "$pkgname-$pkgver"
+ autoreconf -vif
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/community/libnfs/PKGBUILD b/abs/extra/community/libnfs/PKGBUILD
new file mode 100644
index 0000000..687a416
--- /dev/null
+++ b/abs/extra/community/libnfs/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id$
+# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+
+pkgname=libnfs
+pkgver=1.3.0
+pkgrel=1
+pkgdesc="client library for accessing NFS shares"
+arch=('i686' 'x86_64')
+url="https://github.com/sahlberg/libnfs"
+license=('GPL')
+depends=('glibc')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sahlberg/libnfs/tarball/$pkgname-$pkgver")
+_srcfolder=sahlberg-libnfs-47e5a2c
+sha256sums=('0acda3029db699c3978684080843f71d222ad35b30a2ff0d220d144e98854948')
+options=(!libtool)
+
+build() {
+ mv "$_srcfolder" "$pkgname-$pkgver"
+
+ cd "$pkgname-$pkgver"
+
+ autoreconf -vif
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/community/libshairport/PKGBUILD b/abs/extra/community/libshairport/PKGBUILD
new file mode 100644
index 0000000..293e1cc
--- /dev/null
+++ b/abs/extra/community/libshairport/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id$
+# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+
+pkgname=libshairport
+_developer='amejia1'
+_version=1.2.1
+_commithash='aeb4987'
+pkgver=${_version}
+pkgrel=2
+pkgdesc="emulates an AirPort Express"
+arch=('i686' 'x86_64')
+url='https://github.com/amejia1/libshairport'
+license=('GPL')
+depends=('openssl' 'libao')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/amejia1/libshairport/tarball/$_commithash")
+sha256sums=('003c65f56123a7cb090b2d7249f0facbef668f7db6048f4b458713892a6911ca')
+options=(!libtool)
+
+_srcfolder=$_developer-$pkgname-$_commithash
+
+build() {
+ mv "$_srcfolder" "$pkgname-$pkgver"
+
+ cd "$pkgname-$pkgver"
+ autoreconf -vif
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/community/yajl/PKGBUILD b/abs/extra/community/yajl/PKGBUILD
new file mode 100644
index 0000000..8cd9121
--- /dev/null
+++ b/abs/extra/community/yajl/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Dave Reisner <d@falconindy.com>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
+
+pkgname=yajl
+pkgver=2.0.4
+pkgrel=1
+pkgdesc='Yet Another JSON Library.'
+arch=('i686' 'x86_64')
+url='http://lloyd.github.com/yajl/'
+license=('ISC')
+makedepends=('cmake')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/lloyd/$pkgname/tarball/$pkgver")
+md5sums=('ee6208e697c43dcccf798ce80d370379')
+
+build() {
+ dirname=$(tar tf "$srcdir/$pkgname-$pkgver.tar.gz" | sed 1q);
+ cd "$dirname"
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .
+
+ make
+}
+
+package() {
+ dirname=$(tar tf "$srcdir/$pkgname-$pkgver.tar.gz" | sed 1q);
+ cd "$dirname"
+
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/abs/extra/crystalhd-git/PKGBUILD b/abs/extra/crystalhd-git/PKGBUILD
index 538c0ae..a7b3e7f 100644
--- a/abs/extra/crystalhd-git/PKGBUILD
+++ b/abs/extra/crystalhd-git/PKGBUILD
@@ -2,24 +2,24 @@
# Maintainer: Petteri Tolonen <petteri.tolonen[at]gmail.com>
pkgname=crystalhd-git
-pkgver=`date +%Y%m%d`
+pkgver=20111227
pkgrel=1
-pkgdesc="Broadcom Crystal HD kernel module from git.wilsonet.com"
+pkgdesc="Broadcom CrystalHD kernel module"
arch=('i686' 'x86_64')
-url="http://git.wilsonet.com/crystalhd.git/"
+url="http://linuxtv.org/git/jarod/crystalhd.git"
license=('GPL2')
-depends=()
-makedepends=('autoconf' 'kernel26-headers>=2.6.32.9' 'make' 'git')
-conflicts=('crystalhd')
+depends=('libcrystalhd-git')
+makedepends=('autoconf' 'make' 'git')
install='crystalhd-git.install'
-_gitroot='git://git.wilsonet.com/crystalhd.git'
+conflicts=('crystalhd')
+_gitroot='git://linuxtv.org/jarod/crystalhd.git'
_gitname='crystalhd'
build() {
cd $startdir/src
- msg "Connecting to git.wilsonet.com GIT server...."
+ msg "Connecting to the GIT server...."
if [ -d $startdir/src/$_gitname ] ; then
cd $_gitname && git pull origin
@@ -33,12 +33,20 @@ build() {
autoconf
./configure --prefix=/usr
- make KDIR=/lib/modules/2.6.34-LinHES/build || return 1
+ sed -i 's/'-Werror'/''/g' Makefile
+
+ if ! grep -q "<linux/delay.h>" $srcdir/crystalhd/driver/linux/crystalhd_flea_ddr.c
+ then
+ sed -i '26i #include <linux/delay.h>' $srcdir/crystalhd/driver/linux/crystalhd_flea_ddr.c
+ fi
+
+ make || return 1
+
mkdir -p $pkgdir/etc/udev/rules.d
mkdir -p $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom
cp -f 20-crystalhd.rules $pkgdir/etc/udev/rules.d/
install -d $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom
install -m 0644 crystalhd.ko $pkgdir/lib/modules/$(uname -r)/kernel/drivers/video/broadcom
-
}
+md5sums=()
diff --git a/abs/extra/fontforge/PKGBUILD b/abs/extra/fontforge/PKGBUILD
new file mode 100644
index 0000000..ff53b21
--- /dev/null
+++ b/abs/extra/fontforge/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Eric Belanger <eric@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=fontforge
+pkgver=20120119
+pkgrel=1
+pkgdesc='Outline and bitmap font editor'
+arch=('i686' 'x86_64')
+url='http://fontforge.sourceforge.net/'
+license=('BSD')
+depends=('libxkbui' 'libxi' 'libxml2' 'pango' 'giflib' 'libtiff' 'python2' 'libspiro')
+options=('!libtool' '!makeflags')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz")
+sha1sums=('2c363af075e77bf35d21ee1939e3d6ab39a9f80c')
+
+# git clone git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge; cd fontforge; git archive --prefix=${pkgname}-${pkgver}/ master | xz > ../${pkgname}-${pkgver}.tar.xz
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's/python /python2 /g' Makefile.dynamic.in
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-type3 \
+ --enable-devicetables \
+ --enable-double \
+ --with-regular-link \
+ --with-python=python2 \
+ --enable-pyextension \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/abs/extra/huludesktop/PKGBUILD b/abs/extra/huludesktop/PKGBUILD
index 58cd1ca..c9ced62 100644
--- a/abs/extra/huludesktop/PKGBUILD
+++ b/abs/extra/huludesktop/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=huludesktop
pkgver=0.2
-pkgrel=3
+pkgrel=4
pkgdesc="Hulu Desktop for Linux"
arch=(i686)
url="http://www.hulu.com/labs/hulu-desktop-linux"
@@ -21,5 +21,5 @@ build() {
install -D -m755 huludesktop.sh ${pkgdir}/usr/LH/bin
}
md5sums=('d9b27d1837ab86526100964e80c3cdd1'
- 'fc6048cc2a6ee3b90808e0b757f0fc9b'
+ '935d923b90abaa4b1838a5e6b23e704e'
'8f7dbf19d6168bc3a5b0c1da1c878693')
diff --git a/abs/extra/huludesktop/huludesktop b/abs/extra/huludesktop/huludesktop
index c3ae870..c3fc9a5 100644
--- a/abs/extra/huludesktop/huludesktop
+++ b/abs/extra/huludesktop/huludesktop
@@ -6,7 +6,7 @@ pos_x = 201
pos_y = 179
[remote]
-lirc_device = /dev/lircd
+lirc_device = /var/run/lirc/lircd
lirc_remote_identifier = mceusb
lirc_release_suffix = _UP
lirc_repeat_threshold = 10
diff --git a/abs/extra/libcrystalhd-git/PKGBUILD b/abs/extra/libcrystalhd-git/PKGBUILD
index 94c7be8..c0bf7d1 100644
--- a/abs/extra/libcrystalhd-git/PKGBUILD
+++ b/abs/extra/libcrystalhd-git/PKGBUILD
@@ -10,7 +10,7 @@ depends=('gcc-libs')
makedepends=('git' 'make')
conflicts=('libcrystalhd')
-_gitroot='git://git.wilsonet.com/crystalhd.git'
+_gitroot='git://linuxtv.org/jarod/crystalhd.git'
_gitname='crystalhd'
build() {
diff --git a/abs/extra/libimobiledevice/PKGBUILD b/abs/extra/libimobiledevice/PKGBUILD
new file mode 100644
index 0000000..81a8003
--- /dev/null
+++ b/abs/extra/libimobiledevice/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Gabriel Martinez < reitaka at gmail dot com >
+
+pkgname=libimobiledevice
+pkgver=1.1.1
+pkgrel=3
+pkgdesc="Is a software library that talks the protocols to support iPhone and iPod Touch devices on Linux"
+url="http://libimobiledevice.org/"
+arch=('i686' 'x86_64')
+license=('GPL2' 'LGPL2.1')
+depends=('usbmuxd' 'libplist' 'gnutls' 'libgcrypt')
+makedepends=('python2' 'swig')
+options=('!libtool')
+source=(http://libimobiledevice.org/downloads/$pkgname-$pkgver.tar.bz2
+ swig-version-check.patch)
+md5sums=('cdc13037e822d9ac2e109536701d153a'
+ '8bb215e36fe0e08a72332c108c7842cc')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # SWIG version check is wrong (still not fixed upstream)
+ patch -p1 -i ../swig-version-check.patch
+
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/libimobiledevice/swig-version-check.patch b/abs/extra/libimobiledevice/swig-version-check.patch
new file mode 100644
index 0000000..c56b095
--- /dev/null
+++ b/abs/extra/libimobiledevice/swig-version-check.patch
@@ -0,0 +1,14 @@
+diff -Nur libimobiledevice-1.0.3.old/configure libimobiledevice-1.0.3/configure
+--- libimobiledevice-1.0.3.old/configure 2010-10-04 07:38:37.000000000 -0700
++++ libimobiledevice-1.0.3/configure 2010-10-08 05:43:05.466686656 -0700
+@@ -3477,9 +3477,7 @@
+ if test -z "$available_patch" ; then
+ available_patch=0
+ fi
+- if test $available_major -ne $required_major \
+- -o $available_minor -ne $required_minor \
+- -o $available_patch -lt $required_patch ; then
++ if test $available_major -lt $required_major ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 1.3.21 is required. You have $swig_version. You should look at http://www.swig.org" >&5
+ $as_echo "$as_me: WARNING: SWIG version >= 1.3.21 is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
+ SWIG=false
diff --git a/abs/extra/libplist/PKGBUILD b/abs/extra/libplist/PKGBUILD
new file mode 100644
index 0000000..3e67eb5
--- /dev/null
+++ b/abs/extra/libplist/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Gabriel Martinez < reitaka at gmail dot com >
+
+pkgname=libplist
+pkgver=1.8
+pkgrel=2
+pkgdesc="A library to handle Apple Property List format whereas it's binary or XML"
+url="http://libimobiledevice.org/"
+arch=('i686' 'x86_64')
+license=('GPL2' 'LGPL2.1')
+depends=('glib2' 'libxml2' 'python2')
+makedepends=('cmake' 'swig')
+source=(http://www.libimobiledevice.org/downloads/$pkgname-$pkgver.tar.bz2)
+sha256sums=('a418da3880308199b74766deef2a760a9b169b81a868a6a9032f7614e20500ec')
+
+build() {
+ mkdir build
+ cd build
+ cmake ../$pkgname-$pkgver \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/libspiro/PKGBUILD b/abs/extra/libspiro/PKGBUILD
new file mode 100644
index 0000000..4055b66
--- /dev/null
+++ b/abs/extra/libspiro/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id$
+# Contributor: Rémy Oudompheng <oudomphe@clipper.ens.fr>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=libspiro
+pkgver=20071029
+pkgrel=2
+pkgdesc='Simplifies the drawing of beautiful curves'
+url='http://libspiro.sourceforge.net/'
+license=('GPL')
+options=('!libtool')
+arch=('i686' 'x86_64')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}_src-${pkgver}.tar.bz2")
+sha1sums=('d8b407b835b35289af2914877a4c6000b4fdd382')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/abs/extra/rtmpdump/PKGBUILD b/abs/extra/rtmpdump/PKGBUILD
index ee3c007..03263a4 100644
--- a/abs/extra/rtmpdump/PKGBUILD
+++ b/abs/extra/rtmpdump/PKGBUILD
@@ -1,34 +1,27 @@
-# Maintainer: xduugu
+# $Id$
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: xduugu
# Contributor: Elis Hughes <elishughes@googlemail.com>
+
pkgname=rtmpdump
-pkgver=2.3
-pkgrel=2
-pkgdesc="A tool to download rtmp:// and rtmpe:// streams"
+pkgver=2.4
+pkgrel=1
+pkgdesc="A tool to download rtmp streams"
arch=('i686' 'x86_64')
url="http://rtmpdump.mplayerhq.hu/"
-license=('LGPL')
+license=('GPL2' 'LGPL2.1')
depends=('openssl')
-source=(
- http://mirrors.kernel.org/gentoo/distfiles/$pkgname-$pkgver.tgz
- # Upstream is not accessible from Vodafone/Germany
- #http://rtmpdump.mplayerhq.hu/download/$pkgname-$pkgver.tgz
-)
-md5sums=('eb961f31cd55f0acf5aad1a7b900ef59')
-sha256sums=('ef38b7a99d82ce6912063d21063aeaf28185341b3df486e24bffce5354224b2c')
-
-#if [[ ! -e "$SRCDEST/${source[0]##*/}" ]]; then
- #cd "$SRCDEST"
- #download_file "$(get_downloadclient "$(get_url "${source[0]}")")" "$(get_url "${source[0]}")" "$(get_filename "${source[0]}")" \
- #|| download_file "$(get_downloadclient "$(get_url "${source[1]}")")" "$(get_url "${source[1]}")" "$(get_filename "${source[1]}")"
- #cd "$OLDPWD"
-#fi
+#source=(http://rtmpdump.mplayerhq.hu/download/${pkgname}-${pkgver}.tgz)
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('2c3b76d46d56180176ef099b8ad50a1608bef1dac35d8cb0b21ceac31b5c0656')
build() {
- cd "$srcdir/$pkgname-$pkgver"
- sed -i 's/^install_so.0:.*/& install_base/' librtmp/Makefile
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make prefix=/usr MANDIR="$pkgdir/usr/share/man" DESTDIR="$pkgdir" install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -d -m755 "${pkgdir}/usr/lib"
+ make prefix=/usr mandir=/usr/share/man DESTDIR="${pkgdir}" install
}
diff --git a/abs/extra/ttf-droid/PKGBUILD b/abs/extra/ttf-droid/PKGBUILD
new file mode 100644
index 0000000..2df7e2b
--- /dev/null
+++ b/abs/extra/ttf-droid/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
+# Contributor: Urs Wolfer <uwolfer @ fwo.ch>
+
+pkgname=ttf-droid
+pkgver=20110417
+pkgrel=2
+pkgdesc="A font created by Ascender Corporation for use by the Open Handset Alliance platform, Android."
+arch=('any')
+license=('apache')
+url="http://code.google.com/android/"
+depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
+install=$pkgname.install
+source=('ftp://ftp.archlinux.org/other/community/ttf-droid/ttf-droid.tar.xz')
+md5sums=('f0dffb54269504a0fdb2c4fe394322ee')
+
+package()
+{
+ cd $srcdir/ttf-droid
+ install -d $pkgdir/usr/share/fonts/TTF/
+ install -m644 *.ttf $pkgdir/usr/share/fonts/TTF/
+}
+
diff --git a/abs/extra/ttf-droid/ttf-droid.install b/abs/extra/ttf-droid/ttf-droid.install
new file mode 100644
index 0000000..7dde94b
--- /dev/null
+++ b/abs/extra/ttf-droid/ttf-droid.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo -n "Updating font cache... "
+ fc-cache -f > /dev/null
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/abs/extra/ttf-liberation/PKGBUILD b/abs/extra/ttf-liberation/PKGBUILD
new file mode 100644
index 0000000..572ae06
--- /dev/null
+++ b/abs/extra/ttf-liberation/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id$
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
+# Contributor: Andreas Zwinkau
+# Contributor: rabyte <rabyte__gmail>
+# Contributor: Stefan Husmann < stefan-husmann@t-online.de>
+
+pkgname=ttf-liberation
+pkgver=1.07.1
+pkgrel=2
+pkgdesc='Red Hats Liberation fonts.'
+arch=('any')
+license=('custom' 'GPL2')
+url='https://www.redhat.com/promo/fonts/'
+depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
+makedepends=('fontforge')
+install=ttf.install
+source=("https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-$pkgver.tar.gz")
+md5sums=('0be45d54cc5e1c2e3102e32b8c190346')
+
+package() {
+ cd "$srcdir/liberation-fonts-ttf-$pkgver"
+
+ install -d "$pkgdir/usr/share/fonts/TTF/"
+ install -m644 *.ttf "$pkgdir/usr/share/fonts/TTF/"
+
+ # install license
+ install -Dm644 "${srcdir}/liberation-fonts-ttf-${pkgver}/License.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/License.txt"
+}
diff --git a/abs/extra/ttf-liberation/ttf.install b/abs/extra/ttf-liberation/ttf.install
new file mode 100644
index 0000000..7d26d0c
--- /dev/null
+++ b/abs/extra/ttf-liberation/ttf.install
@@ -0,0 +1,16 @@
+post_install() {
+ echo -n "Updating font cache... "
+ fc-cache -f > /dev/null
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
+
diff --git a/abs/extra/upower/PKGBUILD b/abs/extra/upower/PKGBUILD
new file mode 100644
index 0000000..370f483
--- /dev/null
+++ b/abs/extra/upower/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=upower
+pkgver=0.9.15
+pkgrel=2
+pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics"
+arch=('i686' 'x86_64')
+url="http://upower.freedesktop.org"
+license=('GPL')
+depends=('udev' 'libusb' 'polkit' 'pm-utils' 'dbus-glib' 'libimobiledevice')
+makedepends=('intltool' 'docbook-xsl' 'gobject-introspection')
+options=('!libtool')
+source=($url/releases/$pkgname-$pkgver.tar.xz)
+sha256sums=('d5941480f32dcee47401b3f650485c71f70e7eb0d92537bf4b62410248a6238c')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib/upower --disable-static
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/extra/usbmuxd/PKGBUILD b/abs/extra/usbmuxd/PKGBUILD
new file mode 100644
index 0000000..758cb66
--- /dev/null
+++ b/abs/extra/usbmuxd/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Gabriel Martinez < reitaka at gmail dot com >
+
+pkgname=usbmuxd
+pkgver=1.0.7
+pkgrel=2
+pkgdesc="USB Multiplex Daemon"
+url="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
+arch=('i686' 'x86_64')
+license=('GPL2' 'GPL3' 'LGPL2.1')
+depends=('libusb>=1.0.8')
+makedepends=('cmake')
+install=usbmuxd.install
+source=(http://marcansoft.com/uploads/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ usbmuxd-udevuser.patch
+ usbmuxd-describe.patch)
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/usbmuxd-udevuser.patch"
+ patch -Np1 -i "${srcdir}/usbmuxd-describe.patch"
+ mkdir build
+ cd build
+ cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX=""
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+}
+md5sums=('6f431541f3177fa06aa6df9ceecb2da0'
+ '8526f24f4ad16cd6b2a7321c0b59592c'
+ 'bac157d6e01e1e0d56750f73850b96fb')
diff --git a/abs/extra/usbmuxd/__changelog b/abs/extra/usbmuxd/__changelog
new file mode 100644
index 0000000..7b30556
--- /dev/null
+++ b/abs/extra/usbmuxd/__changelog
@@ -0,0 +1 @@
+- added usbmuxd-describe.patch so version number is correctly detected
diff --git a/abs/extra/usbmuxd/usbmuxd-describe.patch b/abs/extra/usbmuxd/usbmuxd-describe.patch
new file mode 100644
index 0000000..3023235
--- /dev/null
+++ b/abs/extra/usbmuxd/usbmuxd-describe.patch
@@ -0,0 +1,20 @@
+--- usbmuxd-1.0.7/Modules/describe.sh.orig 2012-04-07 22:37:03.218203610 +0000
++++ usbmuxd-1.0.7/Modules/describe.sh 2012-04-07 22:37:22.979010437 +0000
+@@ -1,17 +1,8 @@
+ #!/bin/bash
+
+-# Check for git and a git repo.
+-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
+- /bin/echo -n `git describe`
+-
+- # Are there uncommitted changes?
+- git update-index --refresh --unmerged > /dev/null
+- git diff-index --quiet HEAD || /bin/echo -n -dirty
+-else
+ # Check for version tag
+ if [ -e version.tag ]; then
+ /bin/echo -n `cat version.tag`
+ fi
+-fi
+
+ echo
diff --git a/abs/extra/usbmuxd/usbmuxd-udevuser.patch b/abs/extra/usbmuxd/usbmuxd-udevuser.patch
new file mode 100644
index 0000000..51c8f3d
--- /dev/null
+++ b/abs/extra/usbmuxd/usbmuxd-udevuser.patch
@@ -0,0 +1,12 @@
+diff -Nur usbmuxd-1.0.7.orig/udev/85-usbmuxd.rules.in usbmuxd-1.0.7/udev/85-usbmuxd.rules.in
+--- usbmuxd-1.0.7.orig/udev/85-usbmuxd.rules.in 2011-08-04 15:28:32.751579507 +0000
++++ usbmuxd-1.0.7/udev/85-usbmuxd.rules.in 2011-08-04 15:36:20.139265124 +0000
+@@ -1,7 +1,7 @@
+ # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd)
+
+ # Forces iDevices to the last USB configuration and runs usbmuxd
+-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U usbmux"
++ACTION=="add", SUBSYSTEM=="usb", OWNER="usbmux", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U usbmux"
+
+ # Exit usbmuxd when the last device is removed
+ ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -x"
diff --git a/abs/extra/usbmuxd/usbmuxd.install b/abs/extra/usbmuxd/usbmuxd.install
new file mode 100644
index 0000000..1a48596
--- /dev/null
+++ b/abs/extra/usbmuxd/usbmuxd.install
@@ -0,0 +1,19 @@
+post_install() {
+ groupadd -g 140 usbmux &>/dev/null
+ useradd -c 'usbmux user' -u 140 -g usbmux -d / -s /sbin/nologin usbmux &>/dev/null
+ passwd -l usbmux &>/dev/null
+}
+
+post_upgrade() {
+ getent group usbmux >/dev/null 2>&1 || groupadd -g 140 usbmux &>/dev/null
+ getent passwd usbmux >/dev/null 2>&1 || useradd -c 'usbmux user' -u 140 -g usbmux -d / -s /sbin/nologin usbmux &>/dev/null
+}
+
+post_remove() {
+ if getent passwd usbmux >/dev/null 2>&1; then
+ userdel usbmux
+ fi
+ if getent group usbmux >/dev/null 2>&1; then
+ groupdel usbmux
+ fi
+}
diff --git a/abs/extra/xbmc/PKGBUILD b/abs/extra/xbmc/PKGBUILD
index 252e312..49166cc 100644
--- a/abs/extra/xbmc/PKGBUILD
+++ b/abs/extra/xbmc/PKGBUILD
@@ -1,95 +1,94 @@
-# $Id: PKGBUILD 48068 2011-05-27 21:25:39Z schuay $
+# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
-# Contributor: BlackEagle < ike DOT devolder AT herecura DOT be >
+# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
_prefix=/usr
pkgname=xbmc
-pkgver=10.1
+pkgver=11.0
pkgrel=4
pkgdesc="A software media player and entertainment hub for digital media"
arch=('i686' 'x86_64')
url="http://xbmc.org"
license=('GPL' 'custom')
-depends=('bzip2' 'curl' 'enca' 'faac' 'faad2' 'fontconfig' 'fribidi'
- 'glew' 'jasper' 'libcdio' 'libgl' 'libmad' 'libmms'
- 'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxinerama'
- 'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer'
- 'smbclient' 'wavpack' 'mesa-demos' 'xorg-utils' 'libmicrohttpd'
- 'libssh' 'libva' 'libmodplug' 'rtmpdump'
- 'sqlite3')
-makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libvdpau' 'unzip' 'zip')
-optdepends=('lirc: remote controller support'
- 'unrar: access compressed files without unpacking them'
- 'udisks: automount external drives'
- 'upower: used to trigger suspend functionality'
- 'libvdpau: for nvidia hardware acceleration'
- 'lcms'
- 'tk')
-install=("${pkgname}.install")
-source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz"
- 'FEH.sh'
- 'snapstream_remote.patch')
+depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio' 'yajl' 'libmysqlclient' 'libjpeg' 'libsamplerate' 'glew' 'libssh' 'libmicrohttpd' 'libxrandr' 'sdl_mixer' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'mesa-demos' 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez' 'linhes-scripts>=7-31')
+makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libxinerama' 'zip' 'vdpau-video' 'libcec' 'udisks' 'upower' 'bluez')
+optdepends=(
+ 'libcec: support for Pulse-Eight USB-CEC adapter'
+ 'vdpau-video: accelerated video playback for nvidia cards'
+ 'xvba-video: accelerated video playback for amd cards'
+ 'lirc: remote controller support'
+ 'udisks: automount external drives'
+ 'upower: used to trigger suspend functionality'
+ 'unrar: access compressed files without unpacking them'
+)
+install="${pkgname}.install"
+source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz" 'xbmc11.patch' 'xbmc.sh')
build() {
cd "${srcdir}/xbmc-$pkgver"
+ patch -p1 < ../xbmc11.patch
- # Patch to add Snapstream Firelfy remote
- patch -Np1 -i ${srcdir}/snapstream_remote.patch || return 1
+ # fix lsb_release dependency
+ sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
- # remove "--as-needed" from LDFLAGS, since it causes
- # undefined symbols at runtime:
- # /usr/lib/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so:
- # undefined symbol: NeAACDecOpen
- unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu"
-
- # fix linking issue with gcc 4.5, see git 6ea61fce78q
- sed -i 's: --soname,: -Wl,--soname,:' \
- xbmc/cores/dvdplayer/Codecs/{,libdvd/}Makefile.in
-
- msg "Bootstrapping XBMC"
+ # Bootstrapping XBMC
./bootstrap
- msg "Configuring XBMC"
- ./configure --prefix=${_prefix} \
+ # Configuring XBMC
+ export PYTHON_VERSION=2 # external python v2
+ ./configure --prefix=$_prefix --exec-prefix=$_prefix \
+ --enable-debug \
+ --enable-optimizations \
+ --enable-gl \
+ --enable-sdl \
+ --enable-vaapi \
--enable-vdpau \
+ --enable-xvba \
+ --enable-joystick \
+ --enable-xrandr \
+ --enable-rsxs \
+ --enable-projectm \
+ --enable-x11 \
+ --enable-rtmp \
+ --enable-samba \
+ --enable-nfs \
+ --enable-afpclient \
+ --enable-airplay \
+ --enable-airtunes \
+ --enable-ffmpeg-libvorbis \
+ --enable-dvdcss \
--disable-hal \
- --disable-avahi \
+ --enable-avahi \
+ --enable-webserver \
+ --enable-optical-drive \
+ --enable-libbluray \
+ --enable-texturepacker \
+ --enable-udev \
+ --enable-libusb \
+ --enable-libcec \
--enable-external-libraries \
- --disable-external-liba52 \
- --disable-external-libdts \
--disable-external-ffmpeg \
- --enable-rtmp \
- --disable-external-python \
- --disable-debug
-
+ --disable-crystalhd
# Now (finally) build
- msg "Running make"
make
- make -C lib/addons/script.module.pil
- make -C lib/addons/script.module.pysqlite
}
package() {
cd "${srcdir}/xbmc-$pkgver"
- msg "Running make install"
- make prefix="${pkgdir}${_prefix}" install
+ # Running make install
+ make DESTDIR="${pkgdir}" install
- # Replace FEH.py with FEH.sh (and thus remove external python dependency)
- install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh"
- sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc"
+ # run feh with python2
+ sed -i -e 's/python/python2/g' ${pkgdir}${_prefix}/bin/xbmc
# lsb_release fix
sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc"
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
- # .desktop files
- install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop"
- install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png"
-
# Tools
install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr"
install -D -m 0755 "${srcdir}/xbmc-$pkgver/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
@@ -100,13 +99,10 @@ package() {
mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
done
- # cleanup some stuff
- msg "Cleanup unneeded files"
- rm -rf "${pkgdir}/usr/share/xsessions"
- rm -f "${pkgdir}/usr/share/xbmc/FEH.py"
- rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache"
+ mkdir -p ${pkgdir}/usr/LH/bin
+ install -D -m 0755 ${srcdir}/xbmc.sh ${pkgdir}/usr/LH/bin
}
# vim:set ts=2 sw=2 et:
-md5sums=('391398126cb86a4f6fbd0b7037997d84'
- '7127c0336f91ff48e408e2d1078fe8eb'
- 'ae41945febf6906761589ddad33c0205')
+md5sums=('9e8a26ee25173c7268abea7f1d82d428'
+ '5aa2e21a1f9fea60a2e5bb345e5aefd0'
+ 'f30d9a68daedd28482813ee40134f243')
diff --git a/abs/extra/xbmc/xbmc.install b/abs/extra/xbmc/xbmc.install
index 6c58697..2964449 100644
--- a/abs/extra/xbmc/xbmc.install
+++ b/abs/extra/xbmc/xbmc.install
@@ -5,7 +5,7 @@ post_install() {
echo " <button>" >> /tmp/library.xml.tmp
echo " <type>MENU_XBMC</type>" >> /tmp/library.xml.tmp
echo " <text>Launch XBMC</text>" >> /tmp/library.xml.tmp
- echo " <action>EXEC /usr/bin/xbmc</action>" >> /tmp/library.xml.tmp
+ echo " <action>EXEC /usrLH//bin/xbmc.sh</action>" >> /tmp/library.xml.tmp
echo " </button>" >> /tmp/library.xml.tmp
echo "<!--#XBMC-->" >> /tmp/library.xml.tmp
echo "" >> /tmp/library.xml.tmp
@@ -38,7 +38,7 @@ post_upgrade() {
echo " <button>" >> /tmp/library.xml.tmp
echo " <type>MENU_XBMC</type>" >> /tmp/library.xml.tmp
echo " <text>Launch XBMC</text>" >> /tmp/library.xml.tmp
- echo " <action>EXEC /usr/bin/xbmc</action>" >> /tmp/library.xml.tmp
+ echo " <action>EXEC /usr/LH/bin/xbmc.sh</action>" >> /tmp/library.xml.tmp
echo " </button>" >> /tmp/library.xml.tmp
echo "<!--#XBMC-->" >> /tmp/library.xml.tmp
echo "" >> /tmp/library.xml.tmp
diff --git a/abs/extra/xbmc/xbmc.sh b/abs/extra/xbmc/xbmc.sh
new file mode 100644
index 0000000..a27f0f1
--- /dev/null
+++ b/abs/extra/xbmc/xbmc.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+#Stop XScreensaver
+stop_xss.sh &
+#Launch XBMC
+/usr/bin/xbmc --lircdev /var/run/lirc/lircd
+#Once XBMC exits, kill stop xss
+killall stop_xss.sh
diff --git a/abs/extra/xbmc/xbmc11.patch b/abs/extra/xbmc/xbmc11.patch
new file mode 100644
index 0000000..fb144d1
--- /dev/null
+++ b/abs/extra/xbmc/xbmc11.patch
@@ -0,0 +1,15 @@
+diff -ruaN xbmc-11.0.orig//xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp xbmc-11.0/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
+--- xbmc-11.0.orig//xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2012-03-21 22:07:50.000000000 +0000
++++ xbmc-11.0/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2012-04-08 21:04:19.000000000 +0000
+@@ -22,9 +22,9 @@
+ #if (defined HAVE_CONFIG_H) && (!defined WIN32)
+ #include "config.h"
+ #endif
+-#ifdef _WIN32
++//#ifdef _WIN32
+ #include "system.h" // just for HAS_LIBRTMP
+-#endif
++//#endif
+
+ #ifdef HAS_LIBRTMP
+ #include "settings/AdvancedSettings.h"