blob: 3ae0cf25568d2851e113407ad7bc7aee8a8553a3 (
plain)
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
|
#!/usr/bin/make -f
# Install the win32-loader-standalone.exe as debian/tools/win32-loader/$(SUITE)/win32-loader.exe on the mirrors
BYHAND ?= yes
BUILD_DATE := $(shell dpkg-parsechangelog -S Date)
W32_VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
W32_BYHAND_NAME := win32-loader_$(W32_VERSION)_all
B_D_PACKAGES := grub-pc-bin cpio-win32 gzip-win32 gpgv-win32 debian-archive-keyring loadlin ipxe nsis libgcrypt-mingw-w64-dev libgpg-error-mingw-w64-dev
PACKAGES_LIST := $(shell set -e; \
for p in ${B_D_PACKAGES}; \
do \
dpkg-query --showformat='$${source:Package;-25} $${source:Version;-25} http://ftp.debian.org/debian/pool/main/$${source:Package;1}/$${source:Package}\\n' --show $$p; \
done)
BUILT_USING_LIST := $(shell set -e; \
for p in ${B_D_PACKAGES}; \
do \
dpkg-query --showformat='$${source:Package} (= $${source:Version}), ' --show $$p; \
done)
NSIS_VERSION := $(shell dpkg-query -f='$${Version}' -W nsis )
%:
dh $@
override_dh_auto_build:
ifeq ($(BYHAND),yes)
# Build the standalone+pxe version
# Don't allow non-Linux kernels, as their download is currently broken (see #819092)
STANDALONE=yes \
PXE=yes \
NOT_ALLKERNELS=yes \
OUTFILE_NAME=$(W32_BYHAND_NAME).exe \
BUILD_DATE="$(BUILD_DATE)" \
dh_auto_build
# Prepare the README file
gawk '{sub(/@PACKAGES_LIST@/,"$(PACKAGES_LIST)")}1 \
{sub(/@NSIS_VERSION@/,"$(NSIS_VERSION)")}1 \
{sub(/@W32_VERSION@/,"$(W32_VERSION)")}1' \
debian/win32-loader_doc.txt > $(W32_BYHAND_NAME).txt
cat debian/copyright >> $(W32_BYHAND_NAME).txt
endif
# Build the cdrom version
OUTFILE_NAME=win32-loader.exe \
BUILD_DATE="$(BUILD_DATE)" \
dh_auto_build
override_dh_auto_clean:
dh_auto_clean
rm -f $(W32_BYHAND_NAME).exe
rm -f $(W32_BYHAND_NAME).txt
override_dh_builddeb:
dh_builddeb
ifeq ($(BYHAND),yes)
cp $(W32_BYHAND_NAME).exe ../
dpkg-distaddfile $(W32_BYHAND_NAME).exe byhand -
cp $(W32_BYHAND_NAME).txt ../
dpkg-distaddfile $(W32_BYHAND_NAME).txt byhand -
endif
override_dh_gencontrol:
dh_gencontrol -- -Vw32-loader:built-using="$(BUILT_USING_LIST)"
|