aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/symlinks/Makefile3
-rw-r--r--examples/symlinks/patches/largefile.diff20
-rw-r--r--examples/symlinks/patches/manpage.diff15
-rw-r--r--examples/symlinks/symlinks.p5m2
4 files changed, 38 insertions, 2 deletions
diff --git a/examples/symlinks/Makefile b/examples/symlinks/Makefile
index 8387e76..7b78b60 100644
--- a/examples/symlinks/Makefile
+++ b/examples/symlinks/Makefile
@@ -1,5 +1,6 @@
include /usr/share/cibs/rules/ips.mk
include /usr/share/cibs/rules/git.mk
+include /usr/share/cibs/rules/patch.mk
include /usr/share/cibs/rules/32.mk
@@ -19,7 +20,7 @@ git-checkout := upstream/$(version)
configure-%-stamp:
touch $@
-build-%-stamp: download-stamp
+build-%-stamp: download-stamp patch-stamp
[ -d "$(builddir)" ] || mkdir -p "$(builddir)"
$(CC) $(CFLAGS) $(sourcedir)/symlinks.c -o $(builddir)/symlinks
touch $@
diff --git a/examples/symlinks/patches/largefile.diff b/examples/symlinks/patches/largefile.diff
new file mode 100644
index 0000000..c62b3ca
--- /dev/null
+++ b/examples/symlinks/patches/largefile.diff
@@ -0,0 +1,20 @@
+Description: Fix warning on large files
+ On files > 2GB on 32-bit systems, symlinks would print annyoing error
+ messages "Value too large for defined data type".
+Author: Eduard Bloch <edi@gmx.de>
+Bug-Debian: http://bugs.debian.org/167122
+
+---
+ symlinks.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/symlinks.c
++++ b/symlinks.c
+@@ -1,3 +1,7 @@
++#define _FILE_OFFSET_BITS 64
++#define _LARGEFILE_SOURCE
++#define _LARGEFILE64_SOURCE
++
+ #include <unistd.h>
+ #ifndef _POSIX_SOURCE
+ #define _POSIX_SOURCE
diff --git a/examples/symlinks/patches/manpage.diff b/examples/symlinks/patches/manpage.diff
new file mode 100644
index 0000000..ab28a38
--- /dev/null
+++ b/examples/symlinks/patches/manpage.diff
@@ -0,0 +1,15 @@
+Description: Fix section of the symlinks manpage
+Author: Sven Joachim <svenjoac@gmx.de>
+
+---
+ symlinks.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/symlinks.8
++++ b/symlinks.8
+@@ -1,4 +1,4 @@
+-.TH SYMLINKS 8 "October 2008" "Version 1.4"
++.TH SYMLINKS 1 "October 2008" "Version 1.4"
+
+ .SH NAME
+ symlinks \- symbolic link maintenance utility
diff --git a/examples/symlinks/symlinks.p5m b/examples/symlinks/symlinks.p5m
index c0097a3..89466e8 100644
--- a/examples/symlinks/symlinks.p5m
+++ b/examples/symlinks/symlinks.p5m
@@ -6,5 +6,5 @@ set name=info.source-url value="$(git-url)"
license $(license-file) license=$(license)
file path=usr/bin/symlinks
-file symlinks.8 path=usr/share/man/man8/symlinks.8
+file symlinks.8 path=usr/share/man/man8/symlinks.1