From 069267ff58ad2463ebcc0a521840815c576e387d Mon Sep 17 00:00:00 2001 From: Y Date: Sat, 15 Dec 2018 20:20:58 +0100 Subject: [PATCH] first package --- .SRCINFO | 16 ++++++++++++++++ Makefile.patch | 37 +++++++++++++++++++++++++++++++++++++ PKGBUILD | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 .SRCINFO create mode 100644 Makefile.patch create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..b2d9cd9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = lua52-lpty + pkgdesc = pty control for lua 5.2 + pkgver = 1.2.2 + pkgrel = 1 + url = http://tset.de/lpty/index.html + arch = i686 + arch = x86_64 + license = MIT + depends = lua52 + source = http://tset.de/downloads/lpty-1.2.2-1.tar.gz + source = Makefile.patch + sha1sums = ccacc8f1f1ef87f8339322eb519d0937324b5e5e + sha1sums = 7a21cde96f4d07ea639cf0257cfa365b760563ae + +pkgname = lua52-lpty + diff --git a/Makefile.patch b/Makefile.patch new file mode 100644 index 0000000..49da0c1 --- /dev/null +++ b/Makefile.patch @@ -0,0 +1,37 @@ +--- Makefile.dist 2016-07-18 15:28:52.000000000 +0200 ++++ Makefile 2017-05-27 17:06:44.630971965 +0200 +@@ -5,8 +5,9 @@ + + # try some automatic discovery + OS = $(shell uname -s) +-LUAVERSION = $(shell lua -e "print(string.match(_VERSION, '%d+%.%d+'))") +-LUA_BINDIR = $(shell dirname `which lua`) ++LUA = lua5.2 ++LUAVERSION = $(shell $(LUA) -e "print(string.match(_VERSION, '%d+%.%d+'))") ++LUA_BINDIR = $(shell dirname `which $(LUA)`) + LUAROOT = $(shell dirname $(LUA_BINDIR)) + + # Defaults +@@ -15,9 +16,12 @@ + + CC = gcc + CFLAGS = -fPIC -Wall $(DEBUG) ++ifeq ($(LUA),lua) + LUA_INCDIR = $(LUAROOT)/include ++else ++LUA_INCDIR = $(LUAROOT)/include/lua$(LUAVERSION) ++endif + LUA_LIBDIR = $(LUAROOT)/lib +-LUA = lua + + # OS specialities + ifeq ($(OS),Darwin) +@@ -47,7 +51,7 @@ + cp $(TARGET) $(INST_LIBDIR) + + test: all +- cd samples && LUA_CPATH=../\?.so lua lptytest.lua ++ cd samples && LUA_CPATH=../\?.so $(LUA) lptytest.lua + + clean: + find . -name "*~" -exec rm {} \; diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..5404cb1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Yves G. + +pkgname=lua52-lpty +pkgver=1.2.2 +_upstream_rel=1 +pkgrel=1 +pkgdesc="pty control for lua 5.2" +arch=('i686' 'x86_64') +url="http://tset.de/lpty/index.html" +license=('MIT') +depends=('lua52') +source=("http://tset.de/downloads/lpty-${pkgver}-${_upstream_rel}.tar.gz" + "Makefile.patch") +sha1sums=('ccacc8f1f1ef87f8339322eb519d0937324b5e5e' + '7a21cde96f4d07ea639cf0257cfa365b760563ae') + +prepare() { + cd "${srcdir}/lpty-${pkgver}-${_upstream_rel}" + patch <"${srcdir}/Makefile.patch" +} + +build() { + cd "${srcdir}/lpty-${pkgver}-${_upstream_rel}" + make +} + +package() { + cd "${srcdir}/lpty-${pkgver}-${_upstream_rel}" + make install INST_DIR="${pkgdir}/usr" + mkdir -p "${pkgdir}/usr/share/doc/${pkgname}" + cp -r doc/* samples "${pkgdir}/usr/share/doc/${pkgname}/" +}