-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (39 loc) · 1.26 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
#
# Copyright (C) 2021 Peter Varkoly <pvarkoly@cephalix.eu> Nürnberg, Germany. All rights reserved.
#
DESTDIR = /
SHARE = $(DESTDIR)/usr/share/cephalix/
CRANIXHARE = $(DESTDIR)/usr/share/cranix/
TOPACKAGE = Makefile etc setup tools templates plugins sbin README.md
HERE = $(shell pwd)
PACKAGE = cephalix-base
REPO = /home/OSC/home:pvarkoly:CRANIX
install:
mkdir -p $(SHARE)/{setup,templates,tools,plugins}
mkdir -p $(CRANIXHARE)/plugins/
mkdir -p $(DESTDIR)/etc
mkdir -p $(DESTDIR)/usr/sbin
mkdir -p $(DESTDIR)/$(FILLUPDIR)
rsync -a etc/ $(DESTDIR)/etc/
rsync -a tools/ $(SHARE)/tools/
rsync -a templates/ $(SHARE)/templates/
rsync -a setup/ $(SHARE)/setup/
rsync -a plugins/ $(CRANIXHARE)/plugins/
install -m 755 sbin/* $(DESTDIR)/usr/sbin/
dist:
if [ -e $(PACKAGE) ] ; then rm -rf $(PACKAGE) ; fi
mkdir $(PACKAGE)
for i in $(TOPACKAGE); do \
cp -rp $$i $(PACKAGE); \
done
find $(PACKAGE) -type f > files;
tar jcpf $(PACKAGE).tar.bz2 -T files;
rm files
rm -rf $(PACKAGE)
if [ -d $(REPO)/$(PACKAGE) ] ; then \
cd $(REPO)/$(PACKAGE); osc up; cd $(HERE);\
mv $(PACKAGE).tar.bz2 $(REPO)/$(PACKAGE); \
cd $(REPO)/$(PACKAGE); \
osc vc; \
osc ci -m "New Build Version"; \
fi