-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
89 lines (78 loc) · 2.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
# LinOTP - the open source solution for two factor authentication
# Copyright (C) 2010 - 2019 KeyIdentity GmbH
#
# This file is part of LinOTP admin clients.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License, version 3, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the
# GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# E-mail: [email protected]
# Contact: www.linotp.org
# Support: www.keyidentity.com
#
ECHO = echo
PYTHON=`which python3`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/linotp
PROJECT=LinOTPAdminClientCLI
all:
@echo "make source - Create source package"
@echo "make create - Create the source packages (command client)"
@echo "make install - Install on local system"
@echo "make buildrpm - Generate a rpm package"
@echo "make builddeb - Generate a deb package"
@echo "make clean - Get rid of scratch and byte files"
source:
$(PYTHON) setup.py sdist $(COMPILE)
create:
mkdir -p ../build
make source
mv dist/LinOTPAdminClientCLI*.tar.gz ../build/
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
buildrpm:
# $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
$(PYTHON) setup.py bdist_rpm
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
mkdir -p ../build
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
dpkg-buildpackage -i -I -rfakeroot $(DPKG_BUILDPACKAGE_ARGS)
mv ../linotp-adminclient-cli*.deb ../build/
rm -f ../build/LinOTPAdminClientCLI*.tar.gz
clean:
$(PYTHON) setup.py clean
rm -rf build/ MANIFEST dist/
find . -name '*.pyc' -delete
rm -f ../linotp*adminclient*cli_*.deb
rm -f ../linotp*adminclient*cli_*.dsc
rm -f ../linotp*adminclient*cli_*.changes
rm -f ../linotp*adminclient*cli_*.tar.gz
rm -f ../LinOTP*AdminClient*CLI_*.tar.gz
rm -rf ../build/linotp-adminclient-cli*.deb
fakeroot $(MAKE) -f $(CURDIR)/debian/rules clean
ppa-preprocess:
rm -f ../*.dsc
rm -f ../*.changes
rm -f ../*.upload
rm -f ../linotp-adminclient-cli_*_source.changes
debuild -S
wine:
mkdir -p ../build
wine c:\\python26\\python setup.py bdist --format=wininst
mv dist/LinOTPAdminClientCLI*.win32.exe ../build/