diff options
author | Baptiste Jonglez | 2017-05-18 22:52:43 +0200 |
---|---|---|
committer | Baptiste Jonglez | 2017-05-18 22:52:43 +0200 |
commit | bcc6b17f5cd6b60927d26a7724e30d6f6ad3075d (patch) | |
tree | fa8de67fdd8cbb334601c855a56abba48f085190 | |
download | aur-bcc6b17f5cd6b60927d26a7724e30d6f6ad3075d.tar.gz |
socklab: Initial commit (still some work to do)
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | build.patch | 28 |
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5ba6d915044c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +# Generated by mksrcinfo v8 +# Thu May 18 20:52:43 UTC 2017 +pkgbase = socklab + pkgdesc = Shell interface for teaching the socket API + pkgver = 1.0.0 + pkgrel = 1 + url = http://socklab.forge.imag.fr/ + arch = x86_64 + arch = i686 + license = custom:CeCILL2 + source = https://github.com/drakkar-lig/socklab/archive/v1.0.0/socklab-1.0.0.tar.gz + source = build.patch + sha256sums = c85102d9121ffeea6f5070c796dda134c1865dd43dca6844f96244f5402564c7 + sha256sums = 25250d4c60834dc29c9befd048d36b8f2805e8547e98d7cb021b78ccd5fa1386 + +pkgname = socklab + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c89ebedb052 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org> +pkgname=socklab +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Shell interface for teaching the socket API" +arch=('x86_64' 'i686') +url="http://socklab.forge.imag.fr/" +license=('custom:CeCILL2') +source=("https://github.com/drakkar-lig/socklab/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz" + "build.patch") +sha256sums=('c85102d9121ffeea6f5070c796dda134c1865dd43dca6844f96244f5402564c7' + '25250d4c60834dc29c9befd048d36b8f2805e8547e98d7cb021b78ccd5fa1386') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 -i "$srcdir/build.patch" +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make prefix="/usr" DESTDIR="$pkgdir/" install +} + +# vim:set ts=2 sw=2 et: diff --git a/build.patch b/build.patch new file mode 100644 index 000000000000..b0b954ee315f --- /dev/null +++ b/build.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile b/Makefile +index 35191af..1d4492b 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,8 +34,9 @@ version.c + TARGETS=socklab + OBJS = $(SOURCES:.c=.o) + +-LDFLAGS = -lreadline -lhistory +-CFLAGS = -Wall ++# Let packagers define LDFLAGS and CFLAGS if they want to ++LDFLAGS := -lreadline -lhistory $(LDFLAGS) ++CFLAGS := -Wall $(CFLAGS) + + # Adaptation a Darwin / MacOS X + ifeq ($(shell uname), Darwin) +@@ -51,11 +52,6 @@ LDFLAGS = -lreadline + endif + endif + +-# Adaptation a Linux +-ifeq ($(shell uname), Linux) +-LDFLAGS += -ltermcap +-endif +- + # Adaptation a FreeBSD + # Attention : il faut utiliser gmake... + ifeq ($(shell uname),FreeBSD) |