OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/make -f |
| 2 export DH_VERBOSE = 1 |
| 3 |
| 4 # Use DEB_BUILD_OPTIONS's parallel=n option (see Policy 4.9.1) |
| 5 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS))) |
| 6 PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \ |
| 7 sed -e 's/.*parallel=\([0-9]\+\).*/\1/') |
| 8 else |
| 9 PARALLEL_JOBS := 1 |
| 10 endif |
| 11 |
| 12 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) |
| 13 ifeq (amd64,$(DEB_HOST_ARCH_CPU)) |
| 14 BUILD_TYPE += ReleaseX64 |
| 15 else |
| 16 ifeq (i386,$(DEB_HOST_ARCH_CPU)) |
| 17 BUILD_TYPE += ReleaseIA32 |
| 18 else |
| 19 $(warning unsupported target arch $(DEB_HOST_ARCH_CPU) - continuing anyway) |
| 20 endif |
| 21 endif |
| 22 |
| 23 # Verbose? |
| 24 ifeq (1,$(DH_VERBOSE)) |
| 25 BUILD_ARGS += V=1 |
| 26 endif |
| 27 |
| 28 %: |
| 29 dh $@ |
| 30 |
| 31 override_dh_auto_clean: |
| 32 echo $(DEB_BUILD_OPTIONS) |
| 33 rm -fr dart/out dart/Makefile |
| 34 find . -name *.tmp -execdir rm -f {} \; |
| 35 find . -name *.pyc -execdir rm -f {} \; |
| 36 find . -name *.mk -execdir rm -f {} \; |
| 37 find . -name *.Makefile -execdir rm -f {} \; |
| 38 |
| 39 override_dh_auto_configure: |
| 40 GYP_GENERATORS=make python dart/tools/gyp_dart.py all |
| 41 |
| 42 override_dh_auto_build: |
| 43 make -C dart -j$(PARALLEL_JOBS) \ |
| 44 BUILDTYPE=$(BUILD_TYPE) $(BUILD_ARGS) create_sdk |
| 45 |
| 46 override_dh_auto_install: |
| 47 mkdir -p debian/tmp/out |
| 48 cp -R dart/out/$(BUILD_TYPE)/dart-sdk debian/tmp/out |
| 49 mv debian/tmp/out/dart-sdk debian/tmp/out/dart |
| 50 dh_install |
| 51 dh_link |
OLD | NEW |