-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 913 Bytes
/
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
NAME=oc-sd-optimizations
VERSION=0.04
MAINTAINER='Artur Balanuta'
DEPS := rsyslog
WORK_DIR=src
ARCH=all
DESCRIPTION='OpenChirp.io SD card Optimizations'
POSTINSTALL_SCRIPT=deb/post-install.sh
PREINSTALL_SCRIPT=deb/pre-install.sh
POSTUNINSTALL_SCRIPT=deb/post-uninstall.sh
COMMON_FPM_ARGS=\
--log error \
-C $(WORK_DIR) \
--name $(NAME) \
--version $(VERSION) \
--maintainer $(MAINTAINER) \
--description $(DESCRIPTION) \
--config-files /etc/cron.d/00-oc-logrotate \
--config-files /etc/logrotate.d/rsyslog \
--config-files /etc/systemd/journald.conf.d/00-oc-journal.conf \
--config-files /etc/tmpfiles.d/oc-logs.conf \
--after-install $(POSTINSTALL_SCRIPT) \
--before-install $(PREINSTALL_SCRIPT) \
--after-remove $(POSTUNINSTALL_SCRIPT) \
--verbose
.PHONY: package
package:
fpm -s dir -t deb -a $(ARCH) $(COMMON_FPM_ARGS) $(foreach dep,$(DEPS),-d $(dep))
mv $(NAME)_$(VERSION)_*.deb build/