summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2017-08-02 00:36:06 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-08-02 00:36:06 +0000
commitdfe832ba94b214c8198abca06af3d098b04c2cfd (patch)
treecd13352c52451b89cd744d10f61c2fc023f7d438
parentc17d7322d0fc71f25cac7afbc1251d8d5f090057 (diff)
downloadca-certificates-dfe832ba94b214c8198abca06af3d098b04c2cfd.tar.gz
ca-certificates-dfe832ba94b214c8198abca06af3d098b04c2cfd.tar.bz2
ca-certificates-dfe832ba94b214c8198abca06af3d098b04c2cfd.tar.xz
ca-certificates-dfe832ba94b214c8198abca06af3d098b04c2cfd.zip
add generic build infrastructure
-rw-r--r--.gitignore4
-rw-r--r--Makefile34
2 files changed, 38 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8878f38
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+update-ca-certificates
+c_rehash
+certdata.stamp
+*.crt
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b68925c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+PYTHON := python3
+
+all: update-ca-certificates c_rehash certdata.stamp
+
+update-ca-certificates: update-ca.c
+ ${CC} ${CFLAGS} -o $@ update-ca.c ${LDFLAGS}
+
+c_rehash: c_rehash.c
+ ${CC} ${CFLAGS} -o $@ c_rehash.c -lcrypto ${LDFLAGS}
+
+certdata.stamp:
+ ${PYTHON} certdata2pem.py
+ touch $@
+
+install: all
+ install -d -m755 ${DESTDIR}/etc/ca-certificates/update.d \
+ ${DESTDIR}/usr/bin \
+ ${DESTDIR}/usr/sbin \
+ ${DESTDIR}/usr/share/ca-certificates \
+ ${DESTDIR}/usr/local/share/ca-certificates \
+ ${DESTDIR}/etc/ssl/certs
+
+ for cert in *.crt; do \
+ install -D -m644 $$cert ${DESTDIR}/usr/share/ca-certificates/mozilla/$$cert; \
+ done
+
+ install -D -m644 update-ca-certificates.8 ${DESTDIR}/usr/share/man/man8/update-ca-certificates.8
+ install -m755 update-ca-certificates ${DESTDIR}/usr/sbin
+ install -m755 c_rehash ${DESTDIR}/usr/bin
+
+clean:
+ rm -rf update-ca-certificates c_rehash certdata.stamp *.crt
+
+.PHONY: install clean