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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/jna.jar:/usr/share/java/RXTXcomm.jar
SVNTAG=$(shell dpkg-parsechangelog | grep Version | cut -f2 -d" " | sed 's/[0-9]*:\([0-9].*\)+dfsg-[0-9]/\1/')
%:
dh $@ --with javahelper
override_dh_clean:
rm -rf build/linux/work/hardware/tools
cd core/methods && ant clean
cd build && ant clean
rm -f debian/permission-checker/*.class
dh_clean
override_jh_build:
jh_linkjars
mkdir -p build/linux/work/hardware/tools
cd core/methods && ant
cd build && ant
rm -f build/linux/work/lib/version.txt && echo $(SVNTAG) > build/linux/work/lib/version.txt #comment out after beta
javac debian/permission-checker/arduinopc.java
cd debian/permission-checker && jar cfe arduinopc.jar arduinopc *.class
mv debian/permission-checker/*.jar .
override_dh_installchangelogs:
dh_installchangelogs -k build/linux/work/revisions.txt
override_dh_compress:
dh_compress -X.ino
override_dh_install:
find build/linux/work -type d -empty -delete
dh_install -Xlicense -XLICENSE -XLicense -XMangler/make.sh
mkdir -p debian/arduino-core/usr/share/arduino/lib
mv debian/arduino/usr/share/arduino/lib/*.txt debian/arduino-core/usr/share/arduino/lib
chmod +x debian/arduino-core/usr/share/arduino/hardware/arduino/bootloaders/optiboot/makeall
override_jh_depends:
#jh_depends can't resolve symlinks
DESTDIR=$(CURDIR)/debian/arduino-$(SVNTAG)
TARFILE=arduino_$(SVNTAG)+dfsg.orig.tar.gz
get-orig-source:
wget http://arduino.googlecode.com/files/arduino-$(SVNTAG)-src.tar.gz
#wget http://files.arduino.cc/downloads/arduino-1.0.1-rc2-src.tar.gz #used for RC
#mv arduino-1.0.1-rc2-src.tar.gz arduino-1.0.1~rc2-src.tar.gz #used for RC
jh_repack --upstream-version $(SVNTAG) arduino-$(SVNTAG)-src.tar.gz;\
tar xzf arduino-$(SVNTAG)-src.tar.gz -C debian/;\
#mv debian/arduino-1.0.1-rc2 debian/arduino-1.0.1~rc2 #used for RC
#remove junk
find $(DESTDIR) -type f -iname *.jar -or -iname *.tgz -or -iname *.so -or -iname .cvsignore -or -iname *.bz2 | xargs -n1 rm -f;\
rm -rf $(DESTDIR)/build/linux/dist/tools;\
#upstream set a bunch of files as execultable that should not be. remove the -x bit
find $(DESTDIR) -type f -iname *.jpg -or -iname *.java -or -iname *.pde -or -iname *.h -or -iname *.cpp -or -iname *.c -or -iname makefile -or -iname key*.txt -or -iname pref*.txt -or -iname '*.txt' -print0 | xargs -0 chmod -x;\
tar zcf $(CURDIR)/../$(TARFILE) -C $(CURDIR)/debian arduino-$(SVNTAG);\
rm -fr $(DESTDIR);\
rm -fr arduino-$(SVNTAG)-src.tar.gz
PHONY: build clean binary-indep binary install get-orig-source
|