1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-11-29 09:24:12 +01:00
yubikey-val/Makefile

160 lines
7.7 KiB
Makefile
Raw Normal View History

2015-07-20 22:01:16 +02:00
# Copyright (c) 2009-2015 Yubico AB
2013-04-17 17:25:52 +02:00
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2016-04-19 09:12:59 +02:00
VERSION = 2.35
2009-12-15 22:33:15 +01:00
PACKAGE = yubikey-val
2013-09-18 17:09:37 +02:00
CODE = COPYING Makefile NEWS README ykval-checksum-clients \
2010-03-12 10:45:23 +01:00
ykval-common.php ykval-config.php ykval-db.php ykval-db.sql \
2016-04-18 19:04:40 +02:00
ykval-export ykval-import ykval-log.php ykval-log-verify.php ykval-ping.php \
ykval-queue ykval-revoke.php ykval-synclib.php \
ykval-sync.php ykval-verify.php ykval-export-clients \
ykval-import-clients ykval-db-oci.php ykval-db-pdo.php \
2013-02-13 15:25:25 +01:00
ykval-db.oracle.sql ykval-resync.php ykval-checksum-deactivated \
2013-03-12 08:56:32 +01:00
ykval-synchronize ykval-gen-clients
2013-01-30 10:54:44 +01:00
MANS = ykval-queue.1 ykval-import.1 ykval-export.1 \
ykval-import-clients.1 ykval-export-clients.1 \
2013-02-13 15:25:25 +01:00
ykval-checksum-clients.1 ykval-checksum-deactivated.1 \
2015-01-09 13:28:47 +01:00
ykval-synchronize.1 ykval-gen-clients.1 ykval-nagios-queuelength.1
2011-10-31 08:00:41 +01:00
MUNIN = ykval-munin-ksmlatency.php ykval-munin-vallatency.php \
ykval-munin-queuelength.php ykval-munin-responses.pl \
2014-09-25 09:35:59 +02:00
ykval-munin-yubikeystats.php ykval-munin-ksmresponses.pl
2015-01-09 13:28:47 +01:00
NAGIOS= ykval-nagios-queuelength.php
2014-10-30 09:31:52 +01:00
DOCS = doc/Generating_Clients.adoc doc/Getting_Started_Writing_Clients.adoc \
doc/Import_Export_Data.adoc doc/Installation.adoc doc/Make_Release.adoc \
doc/Munin_Probes.adoc doc/Revocation_Service.adoc \
doc/Server_Replication_Protocol.adoc doc/Sync_Monitor.adoc \
doc/Troubleshooting.adoc doc/Validation_Protocol_V2.0.adoc \
doc/Validation_Server_Algorithm.adoc doc/YubiKey_Info_Format.adoc
2009-11-20 08:22:11 +01:00
2009-12-15 22:33:15 +01:00
all:
@echo "Try 'make install' or 'make symlink'."
2014-09-23 10:36:39 +02:00
@echo "Docs: https://developers.yubico.com/yubikey-val/doc/Installation.html"
2009-12-15 22:33:15 +01:00
@exit 1
2009-11-20 08:22:11 +01:00
2009-12-15 22:33:15 +01:00
# Installation rules.
2009-11-20 08:22:11 +01:00
etcprefix = /etc/yubico/val
2009-12-15 16:38:46 +01:00
sbinprefix = /usr/sbin
phpprefix = /usr/share/yubikey-val
docprefix = /usr/share/doc/yubikey-val
2013-01-30 10:54:44 +01:00
manprefix = /usr/share/man/man1
2010-06-22 17:57:24 +02:00
muninprefix = /usr/share/munin/plugins
2009-12-15 17:11:10 +01:00
wwwgroup = www-data
2009-12-15 16:38:46 +01:00
install:
install -D --mode 644 ykval-verify.php $(DESTDIR)$(phpprefix)/ykval-verify.php
install -D --mode 644 ykval-common.php $(DESTDIR)$(phpprefix)/ykval-common.php
install -D --mode 644 ykval-synclib.php $(DESTDIR)$(phpprefix)/ykval-synclib.php
install -D --mode 644 ykval-sync.php $(DESTDIR)$(phpprefix)/ykval-sync.php
2012-06-29 16:13:38 +02:00
install -D --mode 644 ykval-resync.php $(DESTDIR)$(phpprefix)/ykval-resync.php
install -D --mode 644 ykval-db.php $(DESTDIR)$(phpprefix)/ykval-db.php
install -D --mode 644 ykval-db-pdo.php $(DESTDIR)$(phpprefix)/ykval-db-pdo.php
install -D --mode 644 ykval-db-oci.php $(DESTDIR)$(phpprefix)/ykval-db-oci.php
install -D --mode 644 ykval-log.php $(DESTDIR)$(phpprefix)/ykval-log.php
install -D --mode 644 ykval-log-verify.php $(DESTDIR)$(phpprefix)/ykval-log-verify.php
install -D ykval-queue $(DESTDIR)$(sbinprefix)/ykval-queue
2013-02-13 15:25:25 +01:00
install -D ykval-synchronize $(DESTDIR)$(sbinprefix)/ykval-synchronize
install -D ykval-export $(DESTDIR)$(sbinprefix)/ykval-export
install -D ykval-import $(DESTDIR)$(sbinprefix)/ykval-import
2013-03-12 08:56:32 +01:00
install -D ykval-gen-clients $(DESTDIR)$(sbinprefix)/ykval-gen-clients
install -D ykval-export-clients $(DESTDIR)$(sbinprefix)/ykval-export-clients
install -D ykval-import-clients $(DESTDIR)$(sbinprefix)/ykval-import-clients
install -D ykval-checksum-clients $(DESTDIR)$(sbinprefix)/ykval-checksum-clients
install -D ykval-checksum-deactivated $(DESTDIR)$(sbinprefix)/ykval-checksum-deactivated
2015-01-09 13:28:47 +01:00
install -D ykval-nagios-queuelength.php $(DESTDIR)$(sbinprefix)/ykval-nagios-queuelength
2013-01-30 10:54:44 +01:00
install -D ykval-queue.1 $(DESTDIR)$(manprefix)/ykval-queue.1
2013-02-13 15:25:25 +01:00
install -D ykval-synchronize.1 $(DESTDIR)$(manprefix)/ykval-synchronize.1
2013-01-30 10:54:44 +01:00
install -D ykval-import.1 $(DESTDIR)$(manprefix)/ykval-import.1
install -D ykval-export.1 $(DESTDIR)$(manprefix)/ykval-export.1
2013-03-12 09:35:11 +01:00
install -D ykval-gen-clients.1 $(DESTDIR)$(manprefix)/ykval-gen-clients.1
2013-01-30 10:54:44 +01:00
install -D ykval-import-clients.1 $(DESTDIR)$(manprefix)/ykval-import-clients.1
install -D ykval-export-clients.1 $(DESTDIR)$(manprefix)/ykval-export-clients.1
install -D ykval-checksum-clients.1 $(DESTDIR)$(manprefix)/ykval-checksum-clients.1
install -D ykval-checksum-deactivated.1 $(DESTDIR)$(manprefix)/ykval-checksum-deactivated.1
2011-10-31 08:07:47 +01:00
install -D ykval-munin-ksmlatency.php $(DESTDIR)$(muninprefix)/ykval_ksmlatency
install -D ykval-munin-vallatency.php $(DESTDIR)$(muninprefix)/ykval_vallatency
install -D ykval-munin-queuelength.php $(DESTDIR)$(muninprefix)/ykval_queuelength
install -D ykval-munin-responses.pl $(DESTDIR)$(muninprefix)/ykval_responses
2014-09-25 09:35:59 +02:00
install -D ykval-munin-ksmresponses.pl $(DESTDIR)$(muninprefix)/ykval_ksmresponses
install -D ykval-munin-yubikeystats.php $(DESTDIR)$(muninprefix)/ykval_yubikeystats
install -D --backup --mode 640 --group $(wwwgroup) ykval-config.php $(DESTDIR)$(etcprefix)/ykval-config.php
install -D --mode 644 ykval-db.sql $(DESTDIR)$(docprefix)/ykval-db.sql
install -D --mode 644 ykval-db.oracle.sql $(DESTDIR)$(docprefix)/ykval-db.oracle.sql
install -D --mode 644 $(DOCS) $(DESTDIR)$(docprefix)/
2009-12-15 16:38:46 +01:00
2009-12-15 16:55:09 +01:00
wwwprefix = /var/www/wsapi
symlink:
2011-10-31 08:07:47 +01:00
install -d $(DESTDIR)$(wwwprefix)/2.0
ln -sf $(phpprefix)/ykval-verify.php $(DESTDIR)$(wwwprefix)/2.0/verify.php
ln -sf $(phpprefix)/ykval-sync.php $(DESTDIR)$(wwwprefix)/2.0/sync.php
2012-06-29 16:13:38 +02:00
ln -sf $(phpprefix)/ykval-resync.php $(DESTDIR)$(wwwprefix)/2.0/resync.php
2011-10-31 08:07:47 +01:00
ln -sf 2.0/verify.php $(DESTDIR)$(wwwprefix)/verify.php
2009-12-15 16:55:09 +01:00
2010-02-22 14:34:15 +01:00
revoke:
install -D --mode 644 ykval-revoke.php $(DESTDIR)$(phpprefix)/ykval-revoke.php
2011-10-31 08:07:47 +01:00
ln -sf $(phpprefix)/ykval-revoke.php $(DESTDIR)$(wwwprefix)/revoke.php
2010-02-22 14:34:15 +01:00
2009-12-15 22:33:15 +01:00
# Maintainer rules.
2013-04-10 09:58:17 +02:00
PROJECT = $(PACKAGE)
2009-12-15 22:33:15 +01:00
$(PACKAGE)-$(VERSION).tgz: $(FILES)
mkdir $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)/doc
2015-01-09 13:28:47 +01:00
cp $(CODE) $(MANS) $(MUNIN) $(NAGIOS) $(PACKAGE)-$(VERSION)/
2009-12-15 22:33:15 +01:00
cp $(DOCS) $(PACKAGE)-$(VERSION)/doc/
git2cl > $(PACKAGE)-$(VERSION)/ChangeLog
2009-12-15 22:33:15 +01:00
tar cfz $(PACKAGE)-$(VERSION).tgz $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
dist: $(PACKAGE)-$(VERSION).tgz
clean:
rm -f *~
rm -rf $(PACKAGE)-$(VERSION)
release: dist
2013-01-30 15:59:34 +01:00
@if test -z "$(KEYID)"; then \
echo "Try this instead:"; \
2013-01-30 15:59:34 +01:00
echo " make release KEYID=[PGPKEYID]"; \
echo "For example:"; \
2013-01-30 15:59:34 +01:00
echo " make release KEYID=2117364A"; \
exit 1; \
fi
@head -1 NEWS | grep -q "Version $(VERSION) (released `date -I`)" || \
(echo 'error: You need to update date/version in NEWS'; exit 1)
2013-04-19 15:42:33 +02:00
@if test ! -d "$(YUBICO_GITHUB_REPO)"; then \
2013-04-10 09:58:17 +02:00
echo "yubico.github.com repo not found!"; \
echo "Make sure that YUBICO_GITHUB_REPO is set"; \
exit 1; \
fi
2009-11-20 08:22:11 +01:00
gpg --detach-sign --default-key $(KEYID) $(PACKAGE)-$(VERSION).tgz
gpg --verify $(PACKAGE)-$(VERSION).tgz.sig
2013-01-30 15:59:34 +01:00
git tag -u $(KEYID) -m $(VERSION) $(PACKAGE)-$(VERSION)
2013-04-19 15:43:12 +02:00
@echo "Release created and tagged, remember to git push && git push --tags"
2013-04-10 09:58:17 +02:00
$(YUBICO_GITHUB_REPO)/publish $(PROJECT) $(VERSION) $(PACKAGE)-$(VERSION).tgz*