summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD43
-rw-r--r--fix-ldflags.patch20
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0164dab71f8c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = svnwcrev
+ pkgdesc = Incorporate Subversion repository information into your source
+ pkgver = r18
+ pkgrel = 1
+ url = http://svnwcrev.tigris.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = subversion
+ source = fix-ldflags.patch
+ sha256sums = 91b77d5cc64899382953100fd223d0c23c9f241f7ef41079570372b71a764334
+
+pkgname = svnwcrev
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1dc6b43ed176
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
+
+pkgname=svnwcrev
+pkgdesc='Incorporate Subversion repository information into your source'
+pkgver=r18
+pkgrel=1
+url='http://svnwcrev.tigris.org/'
+arch=('i686' 'x86_64')
+source=(fix-ldflags.patch)
+sha256sums=('91b77d5cc64899382953100fd223d0c23c9f241f7ef41079570372b71a764334')
+depends=('subversion')
+license=('GPL')
+
+prepare() {
+ _svnargs="--username guest --password '' --no-auth-cache -r $pkgver"
+ if [ -d $pkgname/.svn ] ; then
+ cd $pkgname
+ svn up $_svnargs
+ else
+ svn co http://svnwcrev.tigris.org/svn/svnwcrev/trunk/svnwcrev $_svnargs
+ cd $pkgname
+ fi
+
+ patch -Np0 -i ../fix-ldflags.patch
+
+ cp config_mk.template config.mk
+
+ sed -i 's#apr-0#apr-1#' config.mk
+}
+
+build() {
+ cd $pkgname
+
+ touch src/version.h # due to a Makefile bug
+ make src/version.h
+ make
+}
+
+package() {
+ cd $pkgname
+
+ install -Dm755 svnwcrev "$pkgdir"/usr/bin/svnwcrev
+}
diff --git a/fix-ldflags.patch b/fix-ldflags.patch
new file mode 100644
index 000000000000..72242a91fecd
--- /dev/null
+++ b/fix-ldflags.patch
@@ -0,0 +1,20 @@
+Index: Makefile
+===================================================================
+--- Makefile (revision 18)
++++ Makefile (working copy)
+@@ -6,7 +6,7 @@
+ CPPFLAGS=-I$(SUBVERSION_INCLUDE) -I$(APR_INCLUDE)
+ CXXFLAGS=-g3
+
+-LDLIBS=-lpthread -L$(LIBRARIES) -lsvn_client-1 -lsvn_wc-1 -lsvn_subr-1 -lapr-1
++LDLIBS=$(LDFLAGS) -lpthread -L$(LIBRARIES) -lsvn_client-1 -lsvn_wc-1 -lsvn_subr-1 -lapr-1
+
+ objects=src/status.o src/SVNWcRev.o
+
+@@ -36,4 +36,4 @@
+ $(VERSIONFILE):
+ ( $(VERSIONTEXT) )> $(VERSIONFILE)
+
+-
+\ No newline at end of file
++