forked from zextras/zimbra-drive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
132 lines (109 loc) · 4.11 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#
# Copyright (C) 2017 ZeXtras SRL
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2 of
# the License.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License.
# If not, see <http://www.gnu.org/licenses/>.
#
ZAL_ZIMBRA_VERSION?=dev-last
.PHONY: sign-app clean
all: dist/zimbra_drive.tgz dist/zimbradrive.tar.gz dist/zimbra_drive.md5
clean:
rm -rf \
build/nextcloud-app \
build/zimbra-extension \
build/zimlet \
build/LICENSE \
build/README.md \
build/zimbra_drive.md5 \
dist/asciidoc \
dist/zimbra_drive.tgz \
dist/zimbra_drive.md5 \
dist/zimbradrive.tar.gz \
dist/zimbradrive.tar.gz.sign \
dist/admin-guide.pdf
cd docs-src && make clean
cd nextcloud-app && make clean
cd zimbra-extension && make clean
cd zimlet && make clean
# (Own|Next)Cloud App
nextcloud-app/dist/zimbradrive.tar.gz:
cd nextcloud-app && make dist/zimbradrive.tar.gz
build/nextcloud-app/zimbradrive.tar.gz: nextcloud-app/dist/zimbradrive.tar.gz
mkdir -p build/nextcloud-app
cp nextcloud-app/dist/zimbradrive.tar.gz build/nextcloud-app/
# Zimbra Extension
build/zimbra-extension/zimbradrive-extension.conf.example:
mkdir -p build/zimbra-extension
cp zimbra-extension/zimbradrive-extension.conf.example build/zimbra-extension/
build/zimbra-extension/zal.jar:
mkdir -p build/zimbra-extension
cd zimbra-extension && make lib/zal.jar ZAL_ZIMBRA_VERSION=${ZAL_ZIMBRA_VERSION}
cp zimbra-extension/lib/zal.jar build/zimbra-extension/
zimbra-extension/dist/zimbradrive-extension.jar:
cd zimbra-extension && make dist/zimbradrive-extension.jar ZAL_ZIMBRA_VERSION=${ZAL_ZIMBRA_VERSION}
build/zimbra-extension/zimbradrive-extension.jar: build/zimbra-extension/zimbradrive-extension.conf.example \
build/zimbra-extension/zal.jar \
zimbra-extension/dist/zimbradrive-extension.jar
mkdir -p build/zimbra-extension
cp zimbra-extension/dist/zimbradrive-extension.jar build/zimbra-extension/
# Zimlet for Zimbra
zimlet/dist/com_zextras_drive_open.zip:
cd zimlet && make dist/com_zextras_drive_open.zip
build/zimlet/com_zextras_drive_open.zip: zimlet/dist/com_zextras_drive_open.zip
mkdir -p build/zimlet
cp zimlet/dist/com_zextras_drive_open.zip build/zimlet/
# Project package
build/README.md:
mkdir -p build
cp README.md build/
build/LICENSE:
mkdir -p build
cp LICENSE build/
build/zimbra_drive.md5: build/README.md \
build/LICENSE \
build/zimbra-extension/zimbradrive-extension.jar \
build/zimlet/com_zextras_drive_open.zip
mkdir -p build
cd build && find . -type f -not -name "zimbra_drive.md5" -exec md5sum "{}" + > zimbra_drive.md5
dist/zimbra_drive.tgz: build/README.md \
build/LICENSE \
build/zimbra-extension/zimbradrive-extension.jar \
build/zimlet/com_zextras_drive_open.zip \
build/zimbra_drive.md5
mkdir -p build
mkdir -p dist
cd build && tar -czvf ../dist/zimbra_drive.tgz \
zimbra-extension/ \
zimlet/ \
README.md \
LICENSE \
zimbra_drive.md5 \
--owner=0 --group=0
dist/zimbradrive.tar.gz: build/nextcloud-app/zimbradrive.tar.gz
mkdir -p build
mkdir -p dist
cp build/nextcloud-app/zimbradrive.tar.gz dist/zimbradrive.tar.gz
dist/zimbra_drive.md5: dist/zimbra_drive.tgz
cd dist && md5sum zimbra_drive.tgz > zimbra_drive.md5
docs-src/dist/asciidoc/admin-guide.adoc:
cd docs-src && make dist/asciidoc/admin-guide.adoc
dist/asciidoc/admin-guide.adoc: docs-src/dist/asciidoc/admin-guide.adoc
mkdir -p dist
cp -r docs-src/dist/asciidoc dist/
docs-src/dist/admin-guide.pdf:
cd docs-src && make dist/admin-guide.pdf
dist/admin-guide.pdf: docs-src/dist/admin-guide.pdf
mkdir -p dist
cp docs-src/dist/admin-guide.pdf dist/admin-guide.pdf
sign-app:
openssl dgst -sha512 -sign ~/.nextcloud/certificates/zimbradrive.key dist/zimbradrive.tar.gz | openssl base64 > dist/zimbradrive.tar.gz.sign