Merge pull request #166 from yakar/master

afpfs-ng 0.8.1 paketlendi.
This commit is contained in:
Milli İşletim Sistemi (Milis Linux) 2017-06-29 18:36:13 +03:00 committed by GitHub
commit 1d292e6578
8 changed files with 3636 additions and 0 deletions

View File

@ -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] )
;;

View File

@ -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;

View File

@ -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");

View File

@ -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))

View File

@ -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>

View File

@ -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)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
# Description: Apple Dosyalama Protokol (AFP) kütüphanesi.
# URL: http://alexthepuffin.googlepages.com/
# Packager: yakar (aydin@komutan.org)
# Depends on: fuse libgcrypt
name=afpfs-ng
version=0.8.1
release=1
source=( http://downloads.sourceforge.net/sourceforge/$name/$name-$version.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
)
build() {
cd "$SRC/$name-$version"
# apply patches
patch -Np1 -i "$SRC/fix_afpfs-ng_includes.patch"
patch -Np1 -i "$SRC/01-gcrypt.patch"
patch -Np1 -i "$SRC/02-pointer.patch"
patch -Np1 -i "$SRC/10-fix-errno.patch"
patch -Np1 -i "$SRC/20-build-error-fixes.patch"
patch -Np1 -i "$SRC/21-header-path-fix.patch"
patch -Np1 -i "$SRC/30-include-fixes.patch"
./configure --prefix=/usr
make
make DESTDIR="$PKG" install
# install headers
cd include
for header in afpfs-ng/*.h; do
install -Dm644 "$header" "$PKG/usr/include/$header"
done
}