Releasing debian version 6.03~pre1+dfsg-3.
[syslinux-debian/hramrach.git] / debian / rules
blob7d975152dea17ced48baf72dec3b7545ee9c3ca7
1 #!/usr/bin/make -f
3 -include /usr/share/dpkg/vendor.mk
5 SHELL := sh -e
7 DATE=$(shell date +%Y%m%d)
8 VERSION=$(word 1,$(shell cat version))
10 unexport LDFLAGS
13 dh ${@}
15 dfsg:
16 rm -f doc/rfc5071.txt
18 override_dh_auto_build:
19 $(MAKE) CC=/usr/bin/gcc-4.7 DATE="$(DATE)" VERSION="$(VERSION)"
21 override_dh_auto_clean:
22 $(MAKE) clean
24 rm -f version.mk
26 rm -f core/.depend memdisk/.depend
27 rm -f com32/lib*/*.a com32/*/*.c32 core/*.0 core/*.bin core/*.bss core/*.sys dos/*.com gpxe/*.0 memdisk/memdisk memdump/*.com
29 override_dh_auto_install:
30 $(MAKE) install INSTALLROOT=$(CURDIR)/debian/tmp
32 # removing keytab-lilo, already part of the lilo package
33 rm -f debian/tmp/usr/bin/keytab-lilo
35 # removing ms-dos executables
36 rm -f debian/tmp/usr/share/syslinux/*.com
37 rm -rf debian/tmp/usr/share/syslinux/dosutil
39 # moving files for FHS compliance
40 mkdir -p debian/tmp/usr/bin
41 mv debian/tmp/sbin/* debian/tmp/usr/bin
42 -rmdir --ignore-fail-on-non-empty debian/tmp/sbin
44 mkdir -p debian/tmp/usr/lib
45 mv debian/tmp/usr/share/syslinux debian/tmp/usr/lib
46 -rmdir --ignore-fail-on-non-empty debian/tmp/usr/share
48 mkdir -p debian/tmp/usr/share
49 mv debian/tmp/usr/man debian/tmp/usr/share
51 # moving syslinux mbr file location
52 mkdir -p debian/tmp/usr/lib/syslinux/mbr
53 mv debian/tmp/usr/lib/syslinux/*mbr*.bin debian/tmp/usr/lib/syslinux/mbr
54 mv debian/tmp/usr/lib/syslinux/isohd*.bin debian/tmp/usr/lib/syslinux/mbr
56 # moving syslinux modules file location
57 mkdir -p debian/tmp/usr/lib/syslinux/modules/bios
58 mv debian/tmp/usr/lib/syslinux/*.c32 debian/tmp/usr/lib/syslinux/modules/bios
60 mkdir -p debian/tmp/usr/lib/syslinux/modules/efi32
61 mv debian/tmp/usr/lib/syslinux/efi32/*.c32 debian/tmp/usr/lib/syslinux/modules/efi32
62 mv debian/tmp/usr/lib/syslinux/efi32/*.e32 debian/tmp/usr/lib/syslinux/modules/efi32
64 mkdir -p debian/tmp/usr/lib/syslinux/modules/efi64
65 mv debian/tmp/usr/lib/syslinux/efi64/*.c32 debian/tmp/usr/lib/syslinux/modules/efi64
66 mv debian/tmp/usr/lib/syslinux/efi64/*.e64 debian/tmp/usr/lib/syslinux/modules/efi64
68 # moving syslinux-dev files
69 mv debian/tmp/usr/lib/syslinux debian/tmp/usr/lib/syslinux-dev
71 mkdir -p debian/tmp/usr/lib/syslinux
72 mv debian/tmp/usr/lib/syslinux-dev/mbr debian/tmp/usr/lib/syslinux
73 mv debian/tmp/usr/lib/syslinux-dev/memdisk debian/tmp/usr/lib/syslinux
74 mv debian/tmp/usr/lib/syslinux-dev/modules debian/tmp/usr/lib/syslinux
76 # adding documentation
77 mkdir -p debian/tmp/usr/share/doc/syslinux-dev
78 cp -aL README debian/tmp/usr/share/doc/syslinux-dev
79 cp -aL doc debian/tmp/usr/share/doc/syslinux-dev/txt
80 cp -aL txt debian/tmp/usr/share/doc/syslinux-dev/asciidoc
82 rm -f debian/tmp/usr/share/doc/syslinux-dev/keytab-lilo.txt
84 mv debian/tmp/usr/share/doc/syslinux-dev/txt/logo debian/tmp/usr/share/doc/syslinux-dev
85 rm -f debian/tmp/usr/share/doc/syslinux-dev/logo/LICENSE
87 # moving bootloader specific documentation
88 mkdir -p debian/syslinux/usr/share/doc/syslinux
89 mv debian/tmp/usr/share/doc/syslinux-dev/txt/syslinux.txt debian/syslinux/usr/share/doc/syslinux/README.txt
91 mkdir -p debian/extlinux/usr/share/doc/extlinux
92 mv debian/tmp/usr/share/doc/syslinux-dev/txt/extlinux.txt debian/extlinux/usr/share/doc/extlinux/README.txt
94 mkdir -p debian/isolinux/usr/share/doc/isolinux
95 mv debian/tmp/usr/share/doc/syslinux-dev/txt/isolinux.txt debian/isolinux/usr/share/doc/isolinux/README.txt
97 mkdir -p debian/pxelinux/usr/share/doc/pxelinux
98 mv debian/tmp/usr/share/doc/syslinux-dev/txt/pxelinux.txt debian/pxelinux/usr/share/doc/pxelinux/README.txt
100 mkdir -p debian/syslinux-common/usr/share/doc/syslinux-common/txt
101 mv debian/tmp/usr/share/doc/syslinux-dev/README debian/syslinux-common/usr/share/doc/syslinux-common/README.txt
102 mv debian/tmp/usr/share/doc/syslinux-dev/txt/chain.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
103 mv debian/tmp/usr/share/doc/syslinux-dev/txt/gpt.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
104 mv debian/tmp/usr/share/doc/syslinux-dev/txt/mboot.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
105 mv debian/tmp/usr/share/doc/syslinux-dev/txt/memdisk.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
106 mv debian/tmp/usr/share/doc/syslinux-dev/txt/menu.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
107 mv debian/tmp/usr/share/doc/syslinux-dev/txt/pxechn.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
108 mv debian/tmp/usr/share/doc/syslinux-dev/txt/sdi.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
109 mv debian/tmp/usr/share/doc/syslinux-dev/txt/usbkey.txt debian/syslinux-common/usr/share/doc/syslinux-common/txt
111 override_dh_auto_test:
112 # disabled
114 override_dh_builddeb:
115 ifeq ($(DEB_VENDOR),Progress Linux)
116 # including udebs
117 dh_builddeb -- -Zxz
118 else
119 # not including udebs
120 dh_builddeb --no-package=syslinux-installer --no-package=syslinux-udeb -- -Zxz
121 endif
123 override_dh_gencontrol:
124 ifeq ($(DEB_VENDOR),Progress Linux)
125 # including udebs
126 dh_gencontrol
127 else
128 # not including udebs
129 dh_gencontrol --no-package=syslinux-installer --no-package=syslinux-udeb
130 endif
132 override_dh_fixperms:
133 dh_fixperms
135 chmod 0644 debian/*/usr/lib/*/efi*/*
136 chmod 0644 debian/*/usr/lib/*/modules/efi*/*
138 override_dh_install:
139 dh_install --fail-missing
141 override_dh_installchangelogs:
142 dh_installchangelogs NEWS