summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-03-20 15:45:01 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-03-23 11:31:27 +0100
commitff607851dc5173ff446bd878f921a6554b7ddea1 (patch)
treed112c5116dc662a7c72a1dea620dc6e6fe801dc9
parenta9ab4082e13434591131e0041a4234be6d92fea0 (diff)
ffi: Build and install a pkg-config file.
-rw-r--r--ffi/.gitignore1
-rw-r--r--ffi/Makefile11
-rw-r--r--ffi/sequoia.pc.in9
3 files changed, 20 insertions, 1 deletions
diff --git a/ffi/.gitignore b/ffi/.gitignore
new file mode 100644
index 00000000..4e5bd39d
--- /dev/null
+++ b/ffi/.gitignore
@@ -0,0 +1 @@
+sequoia.pc
diff --git a/ffi/Makefile b/ffi/Makefile
index c97852e4..ed3b0d3f 100644
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -31,8 +31,16 @@ examples:
.PHONY: build-release
build-release:
+sequoia.pc: sequoia.pc.in
+ sed -e 's|VERSION|$(VERSION)|g' \
+ -e 's|PREFIX|$(PREFIX)|g' \
+ $< >$@
+
.PHONY: install
-install:
+install: sequoia.pc
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/pkgconfig
+ $(INSTALL) -t $(DESTDIR)$(PREFIX)/share/pkgconfig \
+ sequoia.pc
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include
$(INSTALL) -t $(DESTDIR)$(PREFIX)/include include/sequoia.h
$(INSTALL) -d $(DESTDIR)$(PREFIX)/include/sequoia
@@ -49,4 +57,5 @@ install:
# Housekeeping.
.PHONY: clean
clean:
+ rm -f sequoia.pc
$(MAKE) -Cexamples clean
diff --git a/ffi/sequoia.pc.in b/ffi/sequoia.pc.in
new file mode 100644
index 00000000..684bc55d
--- /dev/null
+++ b/ffi/sequoia.pc.in
@@ -0,0 +1,9 @@
+prefix=PREFIX
+includedir=${prefix}/include
+
+Name: Sequoia
+Description: A modern OpenPGP implementation.
+URL: https://sequoia-pgp.org/
+Version: VERSION
+Requires.private: nettle sqlite3 openssl
+Cflags: -I${includedir}