forked from FABtotum/fabui-colibri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
381 lines (331 loc) · 14.6 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# Base name of distribution and release files
NAME = fabui
# Version is read from first paragraph of REAMDE file
VERSION ?= $(shell grep '^FABUI [0-9]\+\.[0-9]\+' README.md README.md | head -n1 | cut -d' ' -f2)
# Priority for colibri bundle
PRIORITY ?= 090
# FABUI license
LICENSE ?= GPLv2
# OS flavour identifier
OS_FLAVOUR ?= colibri
# FAB-UI system paths
LIB_PATH ?= /var/lib/$(NAME)/
SHARED_PATH ?= /usr/share/$(NAME)/
COLIBRI_LIB_PATH ?= /var/lib/colibri/
METADATA_PATH ?= $(COLIBRI_LIB_PATH)bundle/$(NAME)
WWW_PATH ?= /var/www/
MOUNT_BASE_PATH ?= /mnt/
FABUI_PATH ?= $(SHARED_PATH)
#RECOVERY_PATH ?= $(WWW_PATH)recovery/
UPLOAD_PATH_LNS ?= $(WWW_PATH)uploads
UPLOAD_PATH ?= $(UPLOAD_PATH_LNS)/
FABUI_TEMP_PATH ?= $(WWW_PATH)temp/
PYTHON_PATH ?= $(FABUI_PATH)ext/py/
BASH_PATH ?= $(FABUI_PATH)ext/bash/
TEMP_PATH ?= /tmp/
RUN_PATH ?= /run/$(NAME)/
BIGTEMP_PATH ?= $(MOUNT_BASE_PATH)bigtemp/
USERDATA_PATH ?= $(MOUNT_BASE_PATH)userdata/
DB_PATH ?= $(LIB_PATH)/
USB_MEDIA_PATH ?= /run/media/
LOCALE_PATH ?= $(FABUI_PATH)locale/
# FAB-UI parameters
SERIAL_PORT ?= /dev/ttyAMA0
SERIAL_BAUD ?= 250000
# OS paths
PHP_CONFIG_FILE_SCANDIR ?= /etc/php/conf.d/
CRON_FOLDER ?= /var/spool/cron/crontabs/
# Logging
LOG_LEVEL ?= INFO
########################## Input Files #################################
# File paths of local files taht will be installed to the configured
# paths according to their type
# <files>/* is to avoid making <files>/<files> path
#PYTHON_FILES = fabui/ext/py*
# <files>/* is to avoid making <files>/<files> path
#SCRIPT_FILES = fabui/ext/bash/*
# Files that will end up in WWW_PATH
WWW_FILES = index.php \
LICENSE \
README.md
# Files that will end up in FABUI_PATH
FABUI_FILES = fabui/recovery \
fabui/ext \
fabui/index.php \
fabui/application \
fabui/system \
fabui/assets \
fabui/utilities \
fabui/locale \
fabui/heads \
fabui/feeders \
fabui/settings \
fabui/cam
# <files>/* is to avoid making <files>/<files> path
RECOVERY_FILES = recovery/*
# Databases (SQLite)
DB = sqlite3
DB_FILES = fabtotum.db
CONFIG_FILES = config.ini serial.ini lang.ini pins.ini cam.ini bluetooth.ini
# Files that will end up in SHARED_PATH
STATIC_FILES =
# Files that will end up in LIB_PATH
DYNAMIC_FILES = $(CONFIG_FILES) \
$(DB_FILES) \
fabui/heads \
fabui/feeders \
fabui/plugins \
fabui/cameras \
fabui/settings \
fabui/cam
# List of files that should go through the generator script
GENERATED_FILES = $(CONFIG_FILES) \
os/colibri/fabui.default
########################################################################
# Build/Install paths
DESTDIR ?= .
TEMP_DIR = ./temp
BDATA_DIR = $(TEMP_DIR)/bdata
BDATA_STAMP = $(TEMP_DIR)/.bdata_stamp
#FABUI_BUNDLE = $(DESTDIR)/$(PRIORITY)-$(NAME)-$(VERSION)-bundle-v$(shell date +%Y%m%d).cb
ifeq ($(VERSION),)
#~ VERSION = 0.9999
VERSION = 0.99.$(shell date +%Y%m%d.%H%M)
endif
FABUI_BUNDLE = $(DESTDIR)/$(PRIORITY)-$(NAME)-v$(VERSION).cb
OS_FILES_DIR = ./os
# This is not a mistake. OS_STAMP is general dependency used bundle rule
OS_STAMP = $(TEMP_DIR)/.os_$(OS_FLAVOUR)_stamp
# OS_COLIBRI_STAMP is specific stamp used in case OS_FLAVOUR is colibri
OS_COLIBRI_STAMP= $(TEMP_DIR)/.os_colibri_stamp
OS_COMMON_STAMP = $(TEMP_DIR)/.os_common_stamp
# User/group
WWW_DATA_NAME = www-data
WWW_DATA_UID = 33
WWW_DATA_GID = 33
WWW_DATA_GROUPS = wheel,dialout,tty,plugdev,video
# Tools
INSTALL ?= install
FAKEROOT ?= fakeroot
FAKEROOT_ENV = $(FAKEROOT) -s $(TEMP_DIR)/.fakeroot_env -i $(TEMP_DIR)/.fakeroot_env --
MKSQUASHFS ?= mksquashfs
BUNDLE_COMP ?= lzo
########################### Makefile rules #############################
.PHONY: locale clean distclean bundle check-tools fabui/locale/*.pot docs
all: check-tools $(FABUI_BUNDLE)
clean:
rm -rf $(TEMP_DIR)
rm -rf $(CONFIG_FILES)
rm -rf $(DB_FILES)
distclean: clean
rm -rf *.cb
rm -rf *.cb.md5sum
rm -f $(GENERATED_FILES)
check-tools:
which fakeroot
@echo "Looking for fakeroot: FOUND"
which mksquashfs
@echo "Looking for mksquashfs: FOUND"
which pojson
@echo "Looking for pojson: FOUND"
which sqlite3
@echo "Looking for sqlite3: FOUND"
which php
@echo "Looking for php: FOUND"
bundle: check-tools distclean $(FABUI_BUNDLE)
# Collects rules of all *.in files and uses the generator on them.
% : %.in
./generate_config.sh $^ $@ \
WWW_PATH=$(WWW_PATH) \
FABUI_PATH=$(FABUI_PATH) \
PYTHON_PATH=$(PYTHON_PATH) \
BASH_PATH=$(BASH_PATH) \
TEMP_PATH=$(TEMP_PATH) \
FABUI_TEMP_PATH=$(FABUI_TEMP_PATH) \
UPLOAD_PATH=$(UPLOAD_PATH) \
UPLOAD_PATH_LNS=$(UPLOAD_PATH_LNS) \
LIB_PATH=$(LIB_PATH) \
SHARED_PATH=$(SHARED_PATH) \
BIGTEMP_PATH=$(BIGTEMP_PATH) \
USERDATA_PATH=$(USERDATA_PATH) \
USB_MEDIA_PATH=$(USB_MEDIA_PATH) \
SERIAL_PORT=$(SERIAL_PORT) \
SERIAL_BAUD=$(SERIAL_BAUD) \
COLIBRI_LIB_PATH=$(COLIBRI_LIB_PATH) \
LOCALE_PATH=$(LOCALE_PATH) \
LOG_LEVEL=$(LOG_LEVEL)
$(TEMP_DIR):
mkdir -p $@
$(BDATA_DIR):
mkdir -p $@
$(BDATA_STAMP): $(TEMP_DIR) $(BDATA_DIR) $(DB_FILES) $(GENERATED_FILES)
# Copy www files
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)$(WWW_PATH)
$(FAKEROOT_ENV) cp -R $(WWW_FILES) $(BDATA_DIR)$(WWW_PATH)
# Copy fabui files
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)$(FABUI_PATH)
$(FAKEROOT_ENV) cp -R $(FABUI_FILES) $(BDATA_DIR)$(FABUI_PATH)
# Copy recovery files
# $(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)$(RECOVERY_PATH)
# $(FAKEROOT_ENV) cp -R $(RECOVERY_FILES) $(BDATA_DIR)$(RECOVERY_PATH)
# Create runtime data directory
$(FAKEROOT_ENV) $(INSTALL) -d -o $(WWW_DATA_UID) -g $(WWW_DATA_GID) -m 0755 $(BDATA_DIR)$(LIB_PATH)
# Create log directory
$(FAKEROOT_ENV) $(INSTALL) -d -o $(WWW_DATA_UID) -g $(WWW_DATA_GID) -m 0755 $(BDATA_DIR)/var/log/fabui
# Install static files
ifneq ($(STATIC_FILES),)
$(FAKEROOT_ENV)mkdir -p $(BDATA_DIR)$(SHARED_PATH)
$(FAKEROOT_ENV) cp -a $(STATIC_FILES) $(BDATA_DIR)$(SHARED_PATH)
endif
# Install dynamic files
ifneq ($(DYNAMIC_FILES),)
$(FAKEROOT_ENV) cp -a $(DYNAMIC_FILES) $(BDATA_DIR)$(LIB_PATH)
endif
# Create sym-links
$(FAKEROOT_ENV) ln -s $(FABUI_PATH) $(BDATA_DIR)$(WWW_PATH)fabui
$(FAKEROOT_ENV) ln -s $(FABUI_PATH)assets $(BDATA_DIR)$(WWW_PATH)assets
$(FAKEROOT_ENV) ln -s $(FABUI_PATH)utilities $(BDATA_DIR)$(WWW_PATH)utilities
$(FAKEROOT_ENV) ln -s $(TEMP_PATH)fabui $(BDATA_DIR)$(WWW_PATH)temp
$(FAKEROOT_ENV) ln -s $(BIGTEMP_PATH) $(BDATA_DIR)$(WWW_PATH)bigtemp
# Python integration
$(FAKEROOT_ENV) $(INSTALL) -d -m 0755 $(BDATA_DIR)/usr/lib/python2.7/site-packages
$(FAKEROOT_ENV) ln -s $(PYTHON_PATH)fabtotum $(BDATA_DIR)/usr/lib/python2.7/site-packages/fabtotum
# The autoinstall flag file is created at compile time
$(FAKEROOT_ENV) touch $(BDATA_DIR)/$(WWW_PATH)/AUTOINSTALL
# The sample flag file is created at compile time
# $(FAKEROOT_ENV) touch $(BDATA_DIR)/$(WWW_PATH)/SAMPLES
# Public runtime directories
#~ $(FAKEROOT_ENV) $(INSTALL) -d -g $(WWW_DATA_GID) -m 0775 $(BDATA_DIR)/$(TEMP_PATH)
# $(FAKEROOT_ENV) $(INSTALL) -d -g $(WWW_DATA_GID) -m 0775 $(BDATA_DIR)$(LIB_PATH)/plugins
# Remove unused files
$(FAKEROOT_ENV) find $(BDATA_DIR) -name "*.po" -delete
$(FAKEROOT_ENV) find $(BDATA_DIR) -name "*.pot" -delete
########################################################################
# Fix permissions
$(FAKEROOT_ENV) chown -R $(WWW_DATA_UID):$(WWW_DATA_GID) $(BDATA_DIR)$(WWW_PATH)
$(FAKEROOT_ENV) chown -R $(WWW_DATA_UID):$(WWW_DATA_GID) $(BDATA_DIR)$(LIB_PATH)
#~ $(FAKEROOT_ENV) chown -R 0:0 $(BDATA_DIR)$(FABUI_FILES)
########################################################################
# Add metadata
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)$(METADATA_PATH)
# metadata/info
$(FAKEROOT_ENV) echo "name: $(NAME)" >> $(BDATA_DIR)$(METADATA_PATH)/info
$(FAKEROOT_ENV) echo "version: $(VERSION)" >> $(BDATA_DIR)$(METADATA_PATH)/info
$(FAKEROOT_ENV) echo "build-date: $(shell date +%Y-%m-%d)" >> $(BDATA_DIR)$(METADATA_PATH)/info
# metadata/packages
$(FAKEROOT_ENV) echo "$(NAME): $(VERSION)" >> $(BDATA_DIR)$(METADATA_PATH)/packages
# metadata/licenses
$(FAKEROOT_ENV) echo "$(NAME): $(LICENSE)" >> $(BDATA_DIR)$(METADATA_PATH)/licenses
# license files
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/usr/share/licenses/$(NAME)
$(FAKEROOT_ENV) cp LICENSE $(BDATA_DIR)/usr/share/licenses/$(NAME)
#|username |uid |group |gid |password |home |shell |groups |comment
$(FAKEROOT_ENV) echo "$(WWW_DATA_NAME) $(WWW_DATA_UID) $(WWW_DATA_NAME) $(WWW_DATA_GID) * /var/www /bin/sh $(WWW_DATA_GROUPS) Web Data" > $(BDATA_DIR)$(METADATA_PATH)/user_table
# Install bundle helper scripts
$(FAKEROOT_ENV) cp -R $(OS_FILES_DIR)/colibri/meta/* $(BDATA_DIR)$(METADATA_PATH)/
# $(FAKEROOT_ENV) cp $(OS_FILES_DIR)/colibri/meta/postpone.sh $(BDATA_DIR)$(METADATA_PATH)/postpone.sh
# Minify
sed -e "s@/var/log/fabui/@./temp@" -i $(BDATA_DIR)/usr/share/fabui/application/config/config.php
$(FAKEROOT_ENV) php $(BDATA_DIR)/usr/share/fabui/index.php control minify
sed -e "s@./temp@/var/log/fabui/@" -i $(BDATA_DIR)/usr/share/fabui/application/config/config.php
# Create a stamp file
touch $@
$(OS_COLIBRI_STAMP):
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/etc/init.d
# Connman iface migration fix
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/connman.init \
$(BDATA_DIR)/etc/init.d/connman
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/fabtotum.init \
$(BDATA_DIR)/etc/init.d/fabtotum
$(FAKEROOT_ENV) $(INSTALL) -D -m 0644 $(OS_FILES_DIR)/colibri/fabtotum.default \
$(BDATA_DIR)/etc/default/fabtotum
$(FAKEROOT_ENV) $(INSTALL) -D -m 0644 $(OS_FILES_DIR)/colibri/fabui.default \
$(BDATA_DIR)/etc/default/fabui
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/fabui.init \
$(BDATA_DIR)/etc/init.d/fabui
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/fabui-ws.init \
$(BDATA_DIR)/etc/init.d/fabui-ws
$(FAKEROOT_ENV) $(INSTALL) -D -m 0644 $(OS_FILES_DIR)/colibri/fabui.default \
$(BDATA_DIR)/etc/default/fabui
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/fabui.first \
$(BDATA_DIR)/etc/firstboot.d/fabui
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/network.first \
$(BDATA_DIR)/etc/firstboot.d/network
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/fixes.init \
$(BDATA_DIR)/etc/init.d/fixes
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/etc/network/if-up.d
$(FAKEROOT_ENV) $(INSTALL) -D -m 0775 $(OS_FILES_DIR)/colibri/zz_default_gateway \
$(BDATA_DIR)/etc/network/if-up.d/zz_default_gateway
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/etc/rc.d/rc.firstboot.d
$(FAKEROOT_ENV) ln -fs ../../firstboot.d/fabui \
$(BDATA_DIR)/etc/rc.d/rc.firstboot.d/S10fabui
$(FAKEROOT_ENV) ln -fs ../../firstboot.d/network \
$(BDATA_DIR)/etc/rc.d/rc.firstboot.d/S09network
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/etc/rc.d/rc.startup.d
$(FAKEROOT_ENV) ln -fs ../../init.d/fabtotum \
$(BDATA_DIR)/etc/rc.d/rc.startup.d/S30fabtotum
$(FAKEROOT_ENV) ln -fs ../../init.d/fabui \
$(BDATA_DIR)/etc/rc.d/rc.startup.d/S40fabui
$(FAKEROOT_ENV) ln -fs ../../init.d/fabui-ws \
$(BDATA_DIR)/etc/rc.d/rc.startup.d/S39fabui-ws
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)/etc/rc.d/rc.shutdown.d
$(FAKEROOT_ENV) ln -fs ../../init.d/fabui \
$(BDATA_DIR)/etc/rc.d/rc.shutdown.d/S20fabui
$(FAKEROOT_ENV) ln -fs ../../init.d/fabui-ws \
$(BDATA_DIR)/etc/rc.d/rc.shutdown.d/S21fabui-ws
$(FAKEROOT_ENV) ln -fs ../../init.d/fabtotum \
$(BDATA_DIR)/etc/rc.d/rc.shutdown.d/S65fabtotum
$(FAKEROOT_ENV) ln -fs ../../init.d/fixes \
$(BDATA_DIR)/etc/rc.d/rc.shutdown.d/S62fixes
# Create a stamp file
touch $@
$(OS_COMMON_STAMP):
# Avahi service
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/avahi/services
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/fabtotum.service $(BDATA_DIR)/etc/avahi/services/fabtotum.service
# Rpi3 Wifi Module loading
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/modules-load.d
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/rpi3_wifi.conf $(BDATA_DIR)/etc/modules-load.d/rpi3_wifi.conf
# Bluetooth configuration
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/bluetooth
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/bluetooth/main.conf $(BDATA_DIR)/etc/bluetooth/main.conf
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/default
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/bluetooth.default $(BDATA_DIR)/etc/default/bluetooth
$(FAKEROOT_ENV) install -D -m 0775 $(OS_FILES_DIR)/colibri/bluetooth.init $(BDATA_DIR)/etc/init.d/bluetooth
# Sudoers fabui rule
$(FAKEROOT_ENV) install -d -m 0750 $(BDATA_DIR)/etc/sudoers.d
$(FAKEROOT_ENV) install -D -m 0440 $(OS_FILES_DIR)/common/fabui.sudoers $(BDATA_DIR)/etc/sudoers.d/fabui
$(FAKEROOT_ENV) chmod 0440 $(BDATA_DIR)/etc/sudoers.d/fabui
# Lighttpd fabui config
$(FAKEROOT_ENV) $(INSTALL) -D -m 0644 $(OS_FILES_DIR)/common/fabui.lighttpd \
$(BDATA_DIR)/etc/lighttpd/conf-available/99-fabui.conf
# PHP settings file
$(FAKEROOT_ENV) install -D $(OS_FILES_DIR)/common/$(NAME).php $(BDATA_DIR)$(PHP_CONFIG_FILE_SCANDIR)$(NAME).ini
# CRON file
$(FAKEROOT_ENV) mkdir -p $(BDATA_DIR)$(CRON_FOLDER)
$(FAKEROOT_ENV) install -D $(OS_FILES_DIR)/common/cron/root $(BDATA_DIR)$(CRON_FOLDER)
# DHCPCD config
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/dhcpcd.conf $(BDATA_DIR)/etc/dhcpcd.conf
# Network manager
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/default
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/wpa_supplicant.default $(BDATA_DIR)/etc/default/wpa_supplicant
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/network.default $(BDATA_DIR)/etc/default/network
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/ifplugd.default $(BDATA_DIR)/etc/default/ifplugd
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/connman.default $(BDATA_DIR)/etc/default/connman
#~ $(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/var/lib/connman
#~ $(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/connman/ethernet.config $(BDATA_DIR)/var/lib/connman/ethernet.config
$(FAKEROOT_ENV) install -d -m 0775 $(BDATA_DIR)/etc/connman
$(FAKEROOT_ENV) install -D -m 0644 $(OS_FILES_DIR)/common/connman/main.conf $(BDATA_DIR)/etc/connman/main.conf
# Create a stamp file
touch $@
%.db: fabui/recovery/sql/%.$(DB)
$(DB) $@ < $<
$(FABUI_BUNDLE): $(BDATA_STAMP) $(OS_COMMON_STAMP) $(OS_STAMP)
$(FAKEROOT_ENV) $(MKSQUASHFS) $(BDATA_DIR) $@ -noappend -comp $(BUNDLE_COMP) -b 512K -no-xattrs
md5sum $@ > [email protected]
include Makefile.locale
include Makefile.docs
minify:
sed -e "s@/var/log/fabui/@./temp@" -i $(BDATA_DIR)/usr/share/fabui/application/config/config.php
$(FAKEROOT_ENV) php $(BDATA_DIR)/usr/share/fabui/index.php control minify
sed -e "s@./temp@/var/log/fabui/@" -i $(BDATA_DIR)/usr/share/fabui/application/config/config.php