File: Makefile

package info (click to toggle)
pyicqt 0.8b-5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,016 kB
  • ctags: 1,751
  • sloc: python: 11,539; sh: 177; makefile: 57; xml: 16
file content (53 lines) | stat: -rw-r--r-- 2,023 bytes parent folder | download | duplicates (4)
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
#
# This makefile handles various developer tasks, such as creating distribution
# packages  It is not particularly useful to end users.
#

TNAME=pyicq-t
EXTENSIONS=".tar.gz .rpm .deb"

all:
	@echo "This makefile is primarily for use by the author for creating"
	@echo "distributions and such.  It serves no purpose to the end user."
	@echo ""
	@echo "Available commands are:"
	@echo "srcdist   create a source distribution of the current version"
	@echo "rpmdist   create a rpm distribution of the current version"
	@echo "debdist   create a debian distribution of the current version"
	@echo "md5sums   determine md5 checksums of all distributions of the current version"
	@echo "dists     try to create all available distributions of the current version"
	@echo "testinst  create a test install directory based off local source tree"

dists: srcdist rpmdist debdist md5sums

srcdist:
	@ver=`cat src/legacy/glue.py | grep 'version =' | cut -f2 -d'"' | cut -f1 -d'"'`; \
	files=`svn list -R`; \
	rm -rf /tmp/$(TNAME)-$${ver}; \
	rm -f /tmp/$(TNAME)-$${ver}.tar.gz; \
	mkdir /tmp/$(TNAME)-$${ver}; \
	tar --no-recursion -cf - $${files} | ( cd /tmp/$(TNAME)-$${ver}; tar -xf - ); \
	mkdir -p /tmp/$(TNAME)-$${ver}/src/twistfix; \
	cd src/twistfix; \
	files=`svn list -R`; \
	tar --no-recursion -cf - $${files} | ( cd /tmp/$(TNAME)-$${ver}/src/twistfix; tar -xf - ); \
	cd /tmp; \
	tar --owner=nobody --group=nobody -cvzf $(TNAME)-$${ver}.tar.gz $(TNAME)-$${ver}; \
	ls -l $(TNAME)-$${ver}.tar.gz

rpmdist:
	@echo "Not supported yet."

debdist:
	@echo "Not supported yet."

md5sums:
	@ver=`cat src/legacy/glue.py | grep 'version =' | cut -f2 -d'"' | cut -f1 -d'"'`; \
	cd /tmp; \
	for E in `echo $(EXTENSIONS)`; do if [ -r "$(TNAME)-$${ver}$${E}" ]; then md5sum $(TNAME)-$${ver}$$E; else echo ".........Does not exist.........  $(TNAME)-$${ver}$$E"; fi; done

testinst:
	@files=`svn list -R`; \
	rm -rf ../$(TNAME)-test; \
	mkdir ../$(TNAME)-test; \
	tar --no-recursion -cf - $${files} | ( cd ../$(TNAME)-test; tar -xvf - );