-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.43 KB
/
Copy pathMakefile
File metadata and controls
54 lines (44 loc) · 1.43 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
APP_NAME=diffident
VERSION=0.3
TMP_DIR=/tmp/$(APP_NAME)
PREFIX=/usr
all:
mkdir -p bin/lib/diffident/
cp -r src/* bin/lib/diffident/
find bin/lib/diffident/ \( -name "*.pyc" -or -name "*~" \) -delete
mkdir -p bin/bin/
cp install/diffident bin/bin/diffident
perl -p -i -e "s@__PREFIX__@${PREFIX}@g" bin/bin/diffident
clean:
rm -rf bin pkg
install: inst
inst:
mkdir -p ${DESTDIR}/${PREFIX}/lib/diffident
cp -r bin/lib/diffident/* ${DESTDIR}/${PREFIX}/lib/diffident/
mkdir -p ${DESTDIR}/${PREFIX}/bin
cp bin/bin/diffident ${DESTDIR}/${PREFIX}/bin/
pkg-all: pkg-src pkg-deb
pkg-src:
mkdir -p pkg
rm -f pkg/$(APP_NAME)-*.tar.bz2
- rm -r $(TMP_DIR)
mkdir $(TMP_DIR)
git archive --format=tar --prefix=$(APP_NAME)-$(VERSION)/ master > pkg/$(APP_NAME)-$(VERSION).tar
bzip2 pkg/$(APP_NAME)-$(VERSION).tar
pkg-deb: pkg-src
- rm -r $(TMP_DIR)
mkdir -p $(TMP_DIR)
cp pkg/$(APP_NAME)-$(VERSION).tar.bz2 $(TMP_DIR)/
tar --directory $(TMP_DIR)/ \
-xjf $(TMP_DIR)/$(APP_NAME)-$(VERSION).tar.bz2
cd $(TMP_DIR)/$(APP_NAME)-$(VERSION)/; \
echo | dh_make --single --copyright gpl -e axis3x3@users.sf.net -f \
../$(APP_NAME)-$(VERSION).tar.bz2
cp install/deb/changelog install/deb/control \
install/deb/copyright $(TMP_DIR)/$(APP_NAME)-$(VERSION)/debian/
cd $(TMP_DIR)/$(APP_NAME)-$(VERSION)/; \
rm debian/README.Debian debian/*.ex debian/*.EX; \
./configure; \
dpkg-buildpackage -rfakeroot; \
mv ../*.deb $(PWD)/pkg/
rm -r $(TMP_DIR);