community/libtermkey: build static library and add it to -dev

This commit is contained in:
Jakub Jirutka 2017-05-13 00:15:31 +02:00
parent b539a1ce40
commit 00279f93a8
2 changed files with 29 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Marvin Steadfast <marvin@xsteadfastx.org>
pkgname=libtermkey
pkgver=0.18
pkgrel=1
pkgrel=2
pkgdesc="Library for easy processing of keyboard entry from terminal-based programs"
url="http://www.leonerd.org.uk/code/libtermkey"
arch="all"
@ -11,7 +11,8 @@ depends=""
depends_dev="unibilium-dev"
makedepends="$depends_dev libtool perl perl-utils"
subpackages="$pkgname-doc $pkgname-dev"
source="http://www.leonerd.org.uk/code/$pkgname/$pkgname-$pkgver.tar.gz"
source="http://www.leonerd.org.uk/code/$pkgname/$pkgname-$pkgver.tar.gz
build-static-lib.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
@ -27,6 +28,5 @@ package() {
make PREFIX=/usr DESTDIR="$pkgdir" install
}
md5sums="3be2e3e5a851a49cc5e8567ac108b520 libtermkey-0.18.tar.gz"
sha256sums="239746de41c845af52bb3c14055558f743292dd6c24ac26c2d6567a5a6093926 libtermkey-0.18.tar.gz"
sha512sums="7507d7bf22ab075e932401b2194dcc69b40138955dc398c86327a072603df2a1010474fa9a1c75aa7cab936fa500e5e53118675b0ec6e9a85b66a1b6b7f5332e libtermkey-0.18.tar.gz"
sha512sums="7507d7bf22ab075e932401b2194dcc69b40138955dc398c86327a072603df2a1010474fa9a1c75aa7cab936fa500e5e53118675b0ec6e9a85b66a1b6b7f5332e libtermkey-0.18.tar.gz
c62d691e5ba451fd2256c9f0baed1f87531c3faac946ad5ce3337f422049c2ca0af84ae302618458856e133177c0dfc4101b3c904a472a886196833aded5064c build-static-lib.patch"

View File

@ -0,0 +1,24 @@
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,9 @@
$(LIBRARY): $(OBJECTS)
$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) $(LDFLAGS) -o $@ $^
+libtermkey.a: $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $^
+
demo: $(LIBRARY) demo.lo
$(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^
@@ -112,9 +115,10 @@
install -d $(DESTDIR)$(LIBDIR)/pkgconfig
sed "s,@LIBDIR@,$(LIBDIR),;s,@INCDIR@,$(INCDIR)," <termkey.pc.in >$(DESTDIR)$(LIBDIR)/pkgconfig/termkey.pc
-install-lib: $(LIBRARY)
+install-lib: $(LIBRARY) libtermkey.a
install -d $(DESTDIR)$(LIBDIR)
$(LIBTOOL) --mode=install install libtermkey.la $(DESTDIR)$(LIBDIR)/libtermkey.la
+ $(LIBTOOL) --mode=install install libtermkey.a $(DESTDIR)$(LIBDIR)/libtermkey.a
install-man:
install -d $(DESTDIR)$(MAN3DIR)