Some stuff for building win32 packages via mingw32
[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         $(MAKE) -C win32/
16         @mv deb/*.deb ./
17         @mv archlinux/this/*pkg.tar.xz ./
18         @mv win32/*.zip ./
19
20 upload:
21         @echo "APPKEY:76vh3q42hnvmzm3" > dropbox_config
22         @echo "APPSECRET:tmeecht2cmh72xa" >> dropbox_config
23         @echo "ACCESS_LEVEL:sandbox" >> dropbox_config
24         @echo "OAUTH_ACCESS_TOKEN:w0bxzf0dft8edfq" >> dropbox_config
25         @echo "OAUTH_ACCESS_TOKEN_SECRET:9vosx7x8gy4kgjk" >> dropbox_config
26         @wget -q "http://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh"
27         @chmod +x dropbox_uploader.sh
28         @sed -i -e "s/~\/.dropbox_uploader/.\/dropbox_config/g" $$(basename $(DROPBOX))
29         @find . -type f -regex ".*/.*\.\(xz\|deb\|zip\)" -exec ./$$(basename $(DROPBOX)) upload {} \;
30         @rm dropbox_config dropbox_uploader.sh
31
32 clean:
33         @rm -f *.deb
34         @rm -f *.pkg.tar.xz
35         @rm -f *.zip
36
37 all: base upload