Commit 8cde6309 authored by Craig Small's avatar Craig Small

Change to python and drop old classes

Rewrote dh_make into python and simplified a lot of the old cruft
 - old rules files dropped
 - cdbs rules files dropped
 - dh7 is the only format supported now
 - package class kernel patches dropped, use dh-kpatches
Removed dpkg-buildflags things, debhelper does this for you.
parent c1b5a607
*.swo
*.swp
......@@ -13,6 +13,9 @@ dh-make (1.201602) UNRELEASED; urgency=medium
* Update init.d.ex to new skeleton Closes: #711146
* watch.ex not installed on native packages Closes: #806672
* Added dh_makefont script Closes: #658154
* Changed program to python
* Dropped support for old and cdbs rules formats
* drop support for kernel patches
-- Craig Small <csmall@debian.org> Mon, 04 Jan 2016 19:27:21 +1100
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.TH DH_MAKE 1 2016-01-04 "Debian Project"
.TH DH_MAKE 1 2016-01-08 "Debian Project"
.SH NAME
dh_make \- prepare Debian packaging for an original source archive
.SH SYNOPSIS
......@@ -12,11 +12,10 @@ dh_make \- prepare Debian packaging for an original source archive
[\-nlsmiadhry] [\-c license] [\-e address] [\-f file] [\-t directory]
[\-o directory] [\-p name] [\-\-copyright license]
[\-\-email address] [\-\-native] [\-\-file file]
[\-\-library] [\-\-single] [\-\-indep] [\-\-multi] [\-\-kmod] [\-\-kpatch]
[\-\-library] [\-\-single] [\-\-indep] [\-\-multi] [\-\-kmod]
[\-\-addmissing] [\-\-yes]
[\-\-templates directory] [\-\-defaultless] [\-\-overlay directory]
[\-\-packagename name]
[\-\-rulesformat format]
[\-\-help] [\-\-version]
.SH DESCRIPTION
.B dh_make
......@@ -162,9 +161,6 @@ Automatically set the package class to Multiple binary, skipping the question.
.BR \-k ", " \-\-kmod
Automatically set the package class to Kernel module, skipping the question.
.TP
.B \-\-kpatch
Automatically set package class to kpatch, skipping the question.
.TP
.BR \-a ", " \-\-addmissing
Adds missing example and control files on an existing debian source directory.
.TP
......@@ -190,11 +186,6 @@ options.
Display the name, version, available options and authors, and exit
successfully.
.TP
.BR \-r ", " \-\-rulesformat\ \fIformat\fR
Set the format for the debian/rules file to \fIformat\fR. The options are
the default Debhelper v7 minimal rules (dh7), the old rules format (old)
or CDBS format (cdbs).
.TP
.BR \-v ", " \-\-version
Show the program name and version, and exit successfully.
.TP
......
......@@ -3,10 +3,6 @@
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
......@@ -16,17 +12,11 @@ include /usr/share/dpkg/default.mk
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ #DH7_ADDON#
dh $@ #DH_ADDON#
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#DPKG_ARCH#
#PATCH_CLASS#
#CONFIGURE#
build: build-stamp
build-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS# #PATCH_STAMP#
dh_testdir
# Add here commands to compile the package.
#MAKE#
#docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
touch $@
clean: #PATCH_CLEAN#
dh_testdir
dh_testroot
rm -f build-stamp #CONFIGURE_STAMP#
# Add here commands to clean up after the build process.
#CLEAN#
dh_clean#PRESERVE#
install: build
dh_testdir
dh_testroot
dh_prep #PRESERVE#
dh_installdirs
# Add here commands to install the package into debian/#PACKAGE#.
#INSTALL#
# Build architecture-independent files here.
binary-indep: install
dh_testdir
dh_testroot
dh_installchangelogs #CHANGELOGS#
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installwm
# dh_installudev
# dh_lintian
# dh_undocumented
dh_installman
dh_link
dh_compress
dh_fixperms
# dh_perl
# dh_python
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install #PHONY_CONFIGURE#
#!/usr/bin/make -f
# -*- makefile -*-
# This version is for a hypothetical package that can build a kernel modules
# architecture-dependant package via make-kpkg, as well as an
# architecture-independent module source package, and other packages
# either dep/indep for things like common files or userspace components
# needed for the kernel modules.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#DPKG_ARCH#
# some default definitions, important!
#
# Name of the source package
psource:=#PACKAGE#-source
# The short upstream name, used for the module source directory
sname:=#PACKAGE#
### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules
# prefix of the target package name
PACKAGE=#PACKAGE#-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make
#PATCH_CLASS#
# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)
# The kdist_config target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the neccessary debian/ files
kdist_config: prep-deb-files
# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean: clean
$(MAKE) $(MFLAGS) -f debian/rules clean
# rm -f driver/*.o driver/*.ko
#
### end KERNEL SETUP
#CONFIGURE#
build-arch: #CONFIGURE_STAMP# #CONFIG_STATUS# build-arch-stamp
build-arch-stamp: #PATCH_STAMP#
dh_testdir
# Add here command to compile/build the package.
$(MAKE)
touch $@
#k = $(shell echo $(KVERS) | grep -q ^2.6 && echo k)
# the binary-modules rule is invoked by module-assistant while processing the
# kdist* targets. It is called by module-assistant or make-kpkg and *not*
# during a normal build
binary-modules:
dh_testroot
dh_prep
dh_installdirs lib/modules/$(KVERS)/misc
# Build the module
$(MAKE) -C drivers KERNEL_DIR=$(KSRC) KVERS=$(KVERS)
# Install the module
cp drivers/slusb.$ko drivers/slamr.$ko debian/$(PKGNAME)/lib/modules/$(KVERS)/misc
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
dh_prep
build-indep: #CONFIG_STATUS# #CONFIGURE_STAMP# build-indep-stamp
build-indep-stamp: #PATCH_STAMP#
dh_testdir
# Add here command to compile/build the arch indep package.
# It's ok not to do anything here, if you don't need to build
# anything for this package.
#docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
touch $@
build: build-arch build-indep
clean: #PATCH_CLEAN#
dh_testdir
#dh_testroot
rm -f build-arch-stamp build-indep-stamp #CONFIGURE_STAMP#
# Add here commands to clean up after the build process.
#CLEAN#
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Create the directories to install the source into
dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian
# Copy only the driver source to the proper location
cp -s driver/* debian/$(psource)/usr/src/modules/$(sname)
# Copy the needed debian/ pieces to the proper location
cp debian/*modules.in* \
debian/$(psource)/usr/src/modules/$(sname)/debian
cp debian/*_KVERS_* debian/rules debian/changelog debian/copyright \
debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian/
cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
# Add here commands to install the package into debian/#PACKAGE#.
#INSTALL#
dh_install
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installchangelogs #CHANGELOGS# -i
dh_installdocs -i
dh_installexamples -i
# dh_install -i
# dh_installmenu -i
# dh_installdebconf -i
# dh_installlogrotate -i
# dh_installemacsen -i
# dh_installpam -i
# dh_installmime -i
# dh_installinit -i
# dh_installcron -i
# dh_installinfo -i
dh_installman -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
# dh_perl -i
# dh_python -i
# dh_makeshlibs -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -s
dh_testroot -s
# dh_installdebconf -s
dh_installdocs -s
dh_installexamples -s
dh_installmenu -s
# dh_installlogrotate -s
# dh_installemacsen -s
# dh_installpam -s
# dh_installmime -s
# dh_installinit -s
dh_installcron -s
# dh_installman -s
dh_installinfo -s
dh_installchangelogs #CHANGELOGS# -s
dh_strip -s
dh_link -s
dh_compress -s
dh_fixperms -s
# dh_makeshlibs -s
dh_installdeb -s
# dh_perl -s
dh_shlibdeps -s
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install #PHONY_CONFIGURE# binary-modules kdist kdist_configure kdist_image kdist_clean
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#DPKG_ARCH#
#PATCH_CLASS#
# shared library versions, option 1
version=2.0.5
major=2
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
#version=`ls src/.libs/lib*.so.* | \
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
#major=`ls src/.libs/lib*.so.* | \
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
#CONFIGURE#
build: build-stamp
build-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS# #PATCH_STAMP#
dh_testdir
# Add here commands to compile the package.
#MAKE#
touch $@
clean: #PATCH_CLEAN#
dh_testdir
dh_testroot
rm -f build-stamp #CONFIGURE_STAMP#
# Add here commands to clean up after the build process.
#CLEAN#
dh_clean#PRESERVE#
install: build
dh_testdir
dh_testroot
dh_prep #PRESERVE#
dh_installdirs
# Add here commands to install the package into debian/tmp
#INSTALL#
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs #CHANGELOGS#
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install #PHONY_CONFIGURE#
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
#DPKG_ARCH#
#PATCH_CLASS#
#CONFIGURE#
#Architecture
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS# #PATCH_STAMP#
# Add here commands to compile the arch part of the package.
##MAKE#
touch $@
build-indep: build-indep-stamp
build-indep-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS# #PATCH_STAMP#
# Add here commands to compile the indep part of the package.
#$(MAKE) doc
touch $@
clean: #PATCH_CLEAN#
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp #CONFIGURE_STAMP#
# Add here commands to clean up after the build process.
#CLEAN#
dh_clean#PRESERVE#
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_prep -i#PRESERVE#
dh_installdirs -i
# Add here commands to install the indep part of the package into
# debian/<package>-doc.
#INSTALLDOC#
dh_install -i
install-arch:
dh_testdir
dh_testroot
dh_prep -s#PRESERVE#
dh_installdirs -s
# Add here commands to install the arch part of the package into
# debian/tmp.
#INSTALL#
dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs #CHANGELOGS#
dh_installdocs
dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch #PHONY_CONFIGURE#
#PACKAGE# for Debian
#DASHLINE#
<possible notes regarding this package - if none, delete this file>
-- #USERNAME# <#EMAIL#> #DATE#
Source: #PACKAGE#
Section: unknown
Priority: optional
Maintainer: #USERNAME# <#EMAIL#>
Build-Depends: #BUILD_DEPS#
Standards-Version: #POLICY#
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/#PACKAGE#.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/#PACKAGE#.git
Package: #PACKAGE#
Architecture: all
Depends: ${kpatch:Depends}
Recommends: linux-source
Suggests: kernel-package
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Patch-name:
Patch-id:
Architecture: all
Path-strip-level: 0
Patch-file:
Kernel-version:
#!/usr/bin/make -f
build: build-stamp
build-stamp:
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
dh_installkpatches
# Build architecture-independent files here.
binary-indep: install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: binary-indep
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
......@@ -3,10 +3,6 @@
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
......@@ -16,17 +12,11 @@ include /usr/share/dpkg/default.mk
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ #DH7_ADDON#
dh $@ #DH_ADDON#
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
#CDBS_CLASS#
#PATCH_CLASS#
# Add here any variable or target overrides you need.
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ #DH7_ADDON#
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#DPKG_ARCH#
#PATCH_CLASS#
#CONFIGURE#
build: build-stamp
build-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS# #PATCH_STAMP#
dh_testdir
# Add here commands to compile the package.
#MAKE#
#docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1
touch $@
clean: #PATCH_CLEAN#
dh_testdir
dh_testroot
rm -f build-stamp #CONFIGURE_STAMP#
# Add here commands to clean up after the build process.
#CLEAN#
dh_clean#PRESERVE#
install: build
dh_testdir
dh_testroot
dh_prep #PRESERVE#
dh_installdirs
# Add here commands to install the package into debian/#PACKAGE#.
#INSTALL#
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir