forked from eventum/eventum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
139 lines (105 loc) · 3.65 KB
/
Makefile
File metadata and controls
139 lines (105 loc) · 3.65 KB
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
133
134
135
136
137
138
139
#
# This is Maintainers makefile
#
# See installation documentation how to install Eventum:
# https://github.com/eventum/eventum/wiki/System-Admin%3A-Doing-a-fresh-install#installation-process
#
name := eventum
datadir := /usr/share/$(name)
sysconfdir := $(datadir)/config
sbindir := /usr/sbin
bindir := /usr/bin
logdir := /var/log/$(name)
smartyplugindir := $(datadir)/lib/Smarty/plugins
PHPCOMPATINFO_VERSION := 5.0.1
PHPUNIT_VERSION := 4.8.11
PHPAB_VERSION := 1.20.3
PHING_VERSION := 2.15.0
PHPCB_VERSION := 1.1.1
PHPCS_FIXER_VERSION := 2.5.0
PHPMD_VERSION := 2.6.0
define find_tool
$(shell PATH=$$PATH:. which $1.phar 2>/dev/null || which $1 2>/dev/null || echo false)
endef
define fetch_tool
curl -sSLf $1 -o $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
endef
php-cs-fixer := $(call find_tool, php-cs-fixer)
phpcompatinfo := $(call find_tool, phpcompatinfo)
gush := $(call find_tool, gush)
all:
@echo 'Run "make install" to install eventum.'
pot:
$(MAKE) -C localization pot
# push to bzr if "po" directory exists
if test -d po; then \
test -d po/.bzr && (cd po && bzr pull); \
cp -p localization/*.pot po/localization; \
test -d po/.bzr && (cd po && bzr commit -m "update .pot" && bzr push); \
fi
install: install-eventum install-cli
snapshot:
./bin/ci/snapshot.sh
test -x ./dropin && ./dropin
dist:
./bin/ci/release.sh
quickdist:
QUICK=true ./bin/ci/release.sh
test:
phpunit
box.phar:
curl -LSs https://box-project.github.io/box2/installer.php | php
composer.phar:
curl -sS https://getcomposer.org/installer | php
php-cs-fixer.phar:
$(call fetch_tool,https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v$(PHPCS_FIXER_VERSION)/php-cs-fixer.phar)
phpcompatinfo.phar:
$(call fetch_tool,http://bartlett.laurent-laville.org/get/phpcompatinfo-$(PHPCOMPATINFO_VERSION).phar)
phpunit.phar:
$(call fetch_tool,https://phar.phpunit.de/phpunit-$(PHPUNIT_VERSION).phar)
phpab.phar:
$(call fetch_tool,http://phpab.net/phpab-$(PHPAB_VERSION).phar)
phpcb.phar:
$(call fetch_tool,https://github.com/mayflower/PHP_CodeBrowser/releases/download/$(PHPCB_VERSION)/phpcb-$(PHPCB_VERSION).phar)
phpmd.phar:
$(call fetch_tool,https://static.phpmd.org/php/$(PHPMD_VERSION)/phpmd.phar)
phing.phar:
$(call fetch_tool,https://www.phing.info/get/phing-$(PHING_VERSION).phar)
gush.phar:
$(call fetch_tool,http://gushphp.org/gush.phar)
codecept.phar:
$(call fetch_tool,http://codeception.com/codecept.phar)
pear-fix: composer.lock
$(php-cs-fixer) fix vendor/pear-pear.php.net --rules=no_php4_constructor --allow-risky=yes --using-cache=no --verbose --show-progress=estimating
phpcs-fix: php-cs-fixer.phar
$(php-cs-fixer) fix --verbose
phpcompatinfo: phpcompatinfo.phar
$(phpcompatinfo) analyser:run --alias current
changelog:
$(gush) branch:changelog
composer.lock:
composer install
# https://security.sensiolabs.org/api
composer-security-checker: composer.lock
curl -H "Accept: text/plain" https://security.sensiolabs.org/check_lock -F lock=@composer.lock
# install eventum core
install-eventum:
install -d $(DESTDIR)$(sysconfdir)
cp -a config/* $(DESTDIR)$(sysconfdir)
install -d $(DESTDIR)$(datadir)/lib
cp -a lib/eventum $(DESTDIR)$(datadir)/lib
cp -a htdocs $(DESTDIR)$(datadir)
cp -a templates $(DESTDIR)$(datadir)
cp -a bin $(DESTDIR)$(datadir)
cp -a src $(DESTDIR)$(datadir)
cp -a res $(DESTDIR)$(datadir)
cp -a db $(DESTDIR)$(datadir)
cp -a *.php $(DESTDIR)$(datadir)
install -d $(DESTDIR)$(logdir)
cp -a var/log/* $(DESTDIR)$(logdir)
# install eventum cli
install-cli:
install -d $(DESTDIR)$(bindir)
install -p cli/$(name).phar $(DESTDIR)$(bindir)/$(name)
install-localization:
$(MAKE) -C localization install