File: rules

package info (click to toggle)
sweethome3d-furniture 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 382,364 kB
  • sloc: makefile: 31
file content (38 lines) | stat: -rwxr-xr-x 994 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

NAME=$(shell dpkg-parsechangelog|grep '^Source:'|cut -f2 -d' ')
UVER=$(shell dpkg-parsechangelog|grep '^Version:'|cut -f2 -d' '|cut -f1 -d-)
FURNITURES=KatorLegaz Reallusion Scopia BlendSwap-CC-BY BlendSwap-CC-0

%:
	dh $@

override_dh_auto_build:
	for furn in $(FURNITURES); do \
		cd $${furn}; zip -r ../$${furn}.sh3f *; cd ..; \
	done

override_dh_auto_clean:
	rm -f *.sh3f


TXZ=$(NAME)_$(UVER).orig.tar.xz
TMPDIR=_tmpdir
TMPWATCH=_tmpwatch
get-orig-source:
	rm -f ../$(TXZ)
	mkdir -p $(TMPDIR)
	for furn in $(FURNITURES); do \
		zipf=3DModels-$${furn}-$(UVER).zip; \
		rm -f ../$${zipf}; \
		sed 's/\[\\w\\-\]\*/'$$furn'/' debian/watch >$(TMPWATCH); \
		cat $(TMPWATCH); \
		uscan --watchfile $(TMPWATCH) --verbose --force-download \
			--no-symlink; \
		cd $(TMPDIR); \
		unzip ../../$${zipf} $${furn}.sh3f; rm -f ../../$${zipf}; \
		unzip $${furn}.sh3f -d$${furn}; rm $${furn}.sh3f; \
		cd ..; \
	done
	tar -Jcvf ../$(TXZ) -C$(TMPDIR) .
	rm -rf $(TMPDIR) $(TMPWATCH)