Some typos
[xonotic/gmqcc.git] / distro / Makefile
1 DROPBOX := dropbox_uploader.sh
2 UNAME   := $(shell uname -m)
3 DOWNLOAD:= ../doc/html/download.c
4 BRANCH  := $(shell git branch | sed -n -e 's/^\* \(.*\)/\1/p')
5 ifneq ($(shell uname -m), x86_64)
6     $(error Cannot build packages without an x86_64 capable CPU)
7 endif
8
9 .NOTPARALLEL: base
10 .NOTPARALLEL: upload
11
12 base:
13         $(MAKE) -C deb/
14         $(MAKE) -C deb/ CARCH=i686
15         $(MAKE) -C archlinux/this/
16         $(MAKE) -C archlinux/this/ CARCH=i686
17         $(MAKE) -C win32/
18         @mv deb/*.deb ./
19         @mv archlinux/this/*pkg.tar.xz ./
20         @mv win32/*.zip ./
21
22 upload:
23         @echo "APPKEY:76vh3q42hnvmzm3" > dropbox_config
24         @echo "APPSECRET:tmeecht2cmh72xa" >> dropbox_config
25         @echo "ACCESS_LEVEL:sandbox" >> dropbox_config
26         @echo "OAUTH_ACCESS_TOKEN:w0bxzf0dft8edfq" >> dropbox_config
27         @echo "OAUTH_ACCESS_TOKEN_SECRET:9vosx7x8gy4kgjk" >> dropbox_config
28         @wget -q "http://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh"
29         @chmod +x dropbox_uploader.sh
30         @sed -i -e "s/~\/.dropbox_uploader/.\/dropbox_config/g" $$(basename $(DROPBOX))
31         @find . -type f -regex ".*/.*\.\(xz\|deb\|zip\)" -exec ./$$(basename $(DROPBOX)) upload {} \;
32         @rm dropbox_config dropbox_uploader.sh
33
34 website:
35         $(CC) $(DOWNLOAD) -o html.gen
36         @./html.gen ../
37         @rm html.gen
38         @git stash
39         @git checkout gh-pages
40         @rm -f ../download.html
41         @mv -f download.html ../download.html
42         @cd ..; git add download.html; git commit -m 'update download page'; git push origin gh-pages;
43         @git checkout $(BRANCH)
44         @git stash apply
45
46 clean:
47         @rm -f *.deb
48         @rm -f *.pkg.tar.xz
49         @rm -f *.zip
50         @rm -f *.gen
51         @rm -f *.html
52
53 all: base upload