summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Vikstrom2017-05-24 06:48:38 +0200
committerSimon Vikstrom2017-05-24 06:48:38 +0200
commitf560d79729b5bb203830ea0e917a65651c43ba6b (patch)
tree89992db0a127ffc8f185f23c9ec272e637d1ec6a
downloadaur-f560d79729b5bb203830ea0e917a65651c43ba6b.tar.gz
First build of the dtls branch with a hack to get DESTDIR to work with autocrap
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD37
-rw-r--r--automakehack.patch22
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..751015b35484
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = libcoap-dtls-git
+ pkgdesc = C-Implementation of CoAP, DTLS
+ pkgver = r849.2586304
+ pkgrel = 1
+ url = https://libcoap.net/
+ arch = x86
+ arch = x86_64
+ license = BSD2
+ license = GPL2
+ makedepends = git
+ provides = libcoap
+ conflicts = libcoap
+ source = libcoap::git://github.com/obgm/libcoap.git#branch=dtls
+ source = automakehack.patch
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = libcoap-dtls-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ed8c8ca154ba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+pkgname=libcoap-dtls-git
+_gitname=libcoap
+pkgver=r849.2586304
+pkgrel=1
+pkgdesc="C-Implementation of CoAP, DTLS"
+arch=('x86' 'x86_64')
+url="https://libcoap.net/"
+license=('BSD2' 'GPL2')
+makedepends=('git')
+provides=('libcoap')
+conflicts=('libcoap')
+source=("$_gitname::git://github.com/obgm/libcoap.git#branch=dtls" "automakehack.patch")
+md5sums=('SKIP' 'SKIP')
+pkgver() {
+ cd "$_gitname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$_gitname"
+ git submodule update --init --recursive
+ patch -p0 -d "ext/tinydtls" < ../automakehack.patch
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+ ./autogen.sh
+ ./configure --prefix="/usr" --disable-documentation --disable-shared --without-debug CFLAGS="-D COAP_DEBUG_FD=stderr"
+ make DESTDIR="$pkgdir"
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+ make DISTDIR="$pkgdir" DESTDIR="$pkgdir" PREFIX="/dinmamma" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/automakehack.patch b/automakehack.patch
new file mode 100644
index 000000000000..22d72e6c6c7d
--- /dev/null
+++ b/automakehack.patch
@@ -0,0 +1,22 @@
+diff --git Makefile.in Makefile.in
+index 932919c..1cf7b82 100644
+--- Makefile.in
++++ Makefile.in
+@@ -104,12 +104,12 @@ dist: $(FILES) $(DISTSUBDIRS)
+ tar czf $(package).tar.gz $(DISTDIR)
+
+ install: $(LIB) $(HEADERS) $(SUBDIRS)
+- test -d $(libdir) || mkdir -p $(libdir)
+- test -d $(includedir) || mkdir -p $(includedir)
+- $(install) $(LIB) $(libdir)/
+- $(install) $(HEADERS) $(includedir)/
++ test -d $(DESTDIR)/$(libdir) || mkdir -p $(DESTDIR)/$(libdir)
++ test -d $(DESTDIR)/$(includedir) || mkdir -p $(DESTDIR)/$(includedir)
++ $(install) $(LIB) $(DESTDIR)/$(libdir)/
++ $(install) $(HEADERS) $(DESTDIR)/$(includedir)/
+ for dir in $(SUBDIRS); do \
+- $(MAKE) -C $$dir install="$(install)" includedir=$(includedir) install; \
++ $(MAKE) -C $$dir install="$(install)" includedir=$(DESTDIR)/$(includedir) install; \
+ done
+
+ TAGS: