1
0
mirror of https://github.com/Yubico/yubikey-ksm.git synced 2024-12-12 12:08:55 +01:00
yubikey-ksm/Makefile

102 lines
3.8 KiB
Makefile
Raw Normal View History

2009-11-20 08:14:27 +01:00
# Written by Simon Josefsson <simon@josefsson.org>.
2010-01-19 07:53:23 +01:00
# Copyright (c) 2009, 2010 Yubico AB
2009-11-20 08:14:27 +01: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.
2010-03-16 15:20:44 +01:00
VERSION = 1.3
2009-12-15 20:54:38 +01:00
PACKAGE = yubikey-ksm
CODE = .htaccess Makefile NEWS ykksm-config.php ykksm-db.sql \
2009-12-15 20:52:37 +01:00
ykksm-decrypt.php ykksm-export.pl ykksm-gen-keys.pl \
2010-03-03 15:20:45 +01:00
ykksm-import.pl ykksm-utils.php ykksm-checksum.pl
2009-12-15 20:54:38 +01:00
DOCS = doc/DecryptionProtocol.wiki doc/DesignGoals.wiki \
2009-12-15 20:52:37 +01:00
doc/GenerateKeys.wiki doc/GenerateKSMKey.wiki \
doc/ImportKeysToKSM.wiki doc/Installation.wiki \
2010-03-16 15:19:09 +01:00
doc/KeyProvisioningFormat.wiki doc/ServerHardening.wiki \
doc/SyncMonitor.wiki
2009-11-20 08:14:27 +01:00
2009-12-15 20:52:37 +01:00
all:
2009-12-15 20:54:38 +01:00
@echo "Try 'make install' or 'make symlink'."
2010-01-19 07:53:23 +01:00
@echo "Docs: http://code.google.com/p/$(PROJECT)/wiki/Installation"
2009-12-15 20:52:37 +01:00
@exit 1
2009-11-20 08:14:27 +01:00
2009-12-15 20:52:37 +01:00
# Installation rules.
2009-11-20 08:14:27 +01:00
2009-12-14 20:21:08 +01:00
etcprefix = /etc/ykksm
2009-12-14 20:16:47 +01:00
binprefix = /usr/bin
phpprefix = /usr/share/ykksm
docprefix = /usr/share/doc/ykksm
2009-12-15 20:03:59 +01:00
wwwgroup = www-data
2009-12-14 20:16:47 +01:00
install:
2009-12-15 20:16:39 +01:00
install -D .htaccess $(phpprefix)/.htaccess
2009-12-14 20:16:47 +01:00
install -D ykksm-decrypt.php $(phpprefix)/ykksm-decrypt.php
install -D ykksm-utils.php $(phpprefix)/ykksm-utils.php
2009-12-15 16:33:19 +01:00
install -D ykksm-gen-keys.pl $(binprefix)/ykksm-gen-keys
2009-12-14 20:16:47 +01:00
install -D ykksm-import.pl $(binprefix)/ykksm-import
install -D ykksm-export.pl $(binprefix)/ykksm-export
2010-03-03 15:20:45 +01:00
install -D ykksm-checksum.pl $(binprefix)/ykksm-checksum
2009-12-15 20:03:59 +01:00
install -D --backup --mode 640 --group $(wwwgroup) ykksm-config.php $(etcprefix)/ykksm-config.php
2009-12-14 20:16:47 +01:00
install -D ykksm-db.sql $(docprefix)/ykksm-db.sql
2009-12-15 20:16:39 +01:00
install -D Makefile $(docprefix)/ykksm.mk
2009-12-14 20:16:47 +01:00
install -D $(DOCS) $(docprefix)/
2009-12-15 20:05:26 +01:00
wwwprefix = /var/www/wsapi
symlink:
install -d $(wwwprefix)
ln -sf $(phpprefix)/.htaccess $(wwwprefix)/.htaccess
2009-12-15 20:17:37 +01:00
ln -sf $(phpprefix)/ykksm-decrypt.php $(wwwprefix)/decrypt.php
2009-12-15 20:05:26 +01:00
2009-12-15 20:52:37 +01:00
# Maintainer rules.
2010-01-19 07:53:23 +01:00
PROJECT = $(PACKAGE)
2009-12-15 20:54:38 +01:00
USER = simon75j
KEYID = B9156397
2009-11-20 08:14:27 +01:00
2009-12-15 20:52:37 +01:00
$(PACKAGE)-$(VERSION).tgz: $(FILES)
mkdir $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)/doc
cp $(CODE) $(PACKAGE)-$(VERSION)/
cp $(DOCS) $(PACKAGE)-$(VERSION)/doc/
tar cfz $(PACKAGE)-$(VERSION).tgz $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
dist: $(PACKAGE)-$(VERSION).tgz
clean:
rm -f *~
rm -rf $(PACKAGE)-$(VERSION)
release: dist
2009-11-20 08:14:27 +01:00
gpg --detach-sign --default-key $(KEYID) $(PACKAGE)-$(VERSION).tgz
gpg --verify $(PACKAGE)-$(VERSION).tgz.sig
svn copy https://$(PROJECT).googlecode.com/svn/trunk/ \
https://$(PROJECT).googlecode.com/svn/tags/$(PACKAGE)-$(VERSION) \
-m "Tagging the $(VERSION) release of the $(PACKAGE) project."
googlecode_upload.py -s "OpenPGP signature for $(PACKAGE) $(VERSION)." \
-p $(PROJECT) -u $(USER) $(PACKAGE)-$(VERSION).tgz.sig
2009-11-20 08:21:47 +01:00
googlecode_upload.py -s "$(PACKAGE) $(VERSION)." \
2009-11-20 08:14:27 +01:00
-p $(PROJECT) -u $(USER) $(PACKAGE)-$(VERSION).tgz