we changed the prefix... there too
[xonotic/gmqcc.git] / distro / Makefile
1 DROPBOX := dropbox_uploader.sh
2 UNAME   := $(shell uname -m)
3 ifneq ($(shell uname -m), x86_64)
4     $(error Cannot build packages without an x86_64 capable CPU)
5 endif
6
7 .NOTPARALLEL: base
8 .NOTPARALLEL: upload
9
10 base:
11         $(MAKE) -C deb/
12         $(MAKE) -C deb/ CARCH=i686
13         $(MAKE) -C archlinux/this/
14         $(MAKE) -C archlinux/this/ CARCH=i686
15         @mv deb/*.deb ./
16         @mv archlinux/this/*pkg.tar.xz ./
17
18 upload:
19         @echo "APPKEY:76vh3q42hnvmzm3" > dropbox_config
20         @echo "APPSECRET:tmeecht2cmh72xa" >> dropbox_config
21         @echo "ACCESS_LEVEL:sandbox" >> dropbox_config
22         @echo "OAUTH_ACCESS_TOKEN:w0bxzf0dft8edfq" >> dropbox_config
23         @echo "OAUTH_ACCESS_TOKEN_SECRET:9vosx7x8gy4kgjk" >> dropbox_config
24         @wget -q "http://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh"
25         @chmod +x dropbox_uploader.sh
26         @sed -i -e "s/~\/.dropbox_uploader/.\/dropbox_config/g" $$(basename $(DROPBOX))
27         @find . -type f -regex ".*/.*\.\(xz\|deb\)" -exec ./$$(basename $(DROPBOX)) upload {} \;
28         @rm dropbox_config dropbox_uploader.sh
29
30 clean:
31         @rm -f *.deb
32         @rm -f *.pkg.tar.xz
33
34 all: base upload