On 2017-01-11 14:25 -0800, J.T. Conklin wrote: > Niels Thykier <niels@thykier.net> writes: > And now that I've refreshed my memory by reading > (https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install), > I see that *.install files can specify both the source and destination > paths. So maybe I can forgo configure/make/install entirely and have > each debian/<pkg>.install file copy files directly from the sources. You can. I've just been doing this for a package which just installs binary drivers from existing upstream collections of drivers. This is exactly analagous to your set-up, I think, in that I have a lot of 'hardware/arch/usage/<set of files>' dirs, and each one is packed up into a very similar-looking package called foo-hardware-usage-driver_ver_arch.deb I have an ugly shell script to generate the control file listing all the packages and the set of executable *.install files to do the copying (below). That's pretty-much what you want, I think. Please don't copy my shell script, it's currently embarassing and rather too specific and fragile, but it illustrates that this is actually fairly straightforward :-) You should do something rather fancier that actually traversed the available directories rather than hardcoded it. You could also use make to ensure that it was actually run to keep things uptodate, etc. #!/bin/sh set -e #set -x EGLDEPS="libegl1-x11, libgles1, libgles2, libopencl1" # make install file and control entry for each platform/arch/gpu/display flavour mkpkg() { # generate dh_install file installfile="mali-${1}-${2}-driver.install" echo "#! /usr/bin/dh-exec" > "${installfile}" echo "${1}/\${DEB_HOST_ARCH}/${2}/* /usr/lib/\${DEB_HOST_MULTIARCH}/" >> "${installfile}" chmod +x ${installfile} #then add control entry case "$1" in 4xx) CODENAME="utgard" ;; t60x|t62x) CODENAME="midgard" ;; t76x) CODENAME="bifrost" ;; esac case "$2" in fbdev) TYPE="framebuffer" DESC="the kernel framebuffer" ;; x11) TYPE="x11" DESC="x11" ;; wayland) TYPE="wayland" DESC="wayland" ;; fbdev-wayland) TYPE="wayland(no DRM)" DESC="wayland without DRM" ;; wayland-fbdev) TYPE="wayland" DESC="wayland" ;; esac cat >> control <<EOF Package: mali-${1}-${2}-driver Architecture: ${3} ${4} Pre-Depends: \${misc:Pre-Depends} Depends: \${shlibs:Depends}, \${misc:Depends}, mali-kernel-modules Provides: ${EGLDEPS} Conflicts: ${EGLDEPS} Replaces: ${EGLDEPS} Description: Mali binary ${TYPE} driver for ${1} This is a binary graphics driver for Arm Mali GPU hardware. It provides optimized hardware acceleration of OpenGL applications using ${DESC}, on Mali ${1} (${CODENAME}) GPU hardware. EOF } #put source pkg in control file cat control-header > control #nasty hack for arch support - fixme! ARCH1=armhf ARCH2=arm64 mkpkg t62x fbdev ${ARCH1} ${ARCH2} #mkpkg t62x wayland ${ARCH1} ${ARCH2} #mkpkg t62x x11 ${ARCH1} ${ARCH2} ARCH=arm64 mkpkg t62x wayland-fbdev ${ARCH} mkpkg t62x fbdev-wayland ${ARCH} ARCH=armhf mkpkg t60x fbdev ${ARCH} mkpkg t60x x11 ${ARCH} mkpkg t62x wayland ${ARCH} mkpkg t62x x11 ${ARCH} mkpkg t76x fbdev ${ARCH} mkpkg t76x x11 ${ARCH} Wookey -- Principal hats: Linaro, Debian, Wookware, ARM http://wookware.org/
Attachment:
signature.asc
Description: Digital signature