diff --git a/README b/README new file mode 100644 index 00000000..e6d6fa02 --- /dev/null +++ b/README @@ -0,0 +1,317 @@ +README for slink_cd v 1.13, released Mar 31 1999 +(c) Steve McIntyre + +What this program does +====================== +It will create CDs of Debian from a local set of files. You will +probably need to mirror most of the Debian site; check out the Debian +mirror package for an example of how to this. A full mirror will take +about 7GB at the time of writing. + +What this program doesn't do +============================ +It does not fix world hunger or bring peace on earth. And it's not +guaranteed to work at all, in fact. But if you have any problems, +please contact me and tell me about them. I'll be glad to help and to +fix any bugs that you might find. + +What it needs +============= +You will almost definitely need a Linux box to run the scripts here, +preferably a Debian one. I haven't had the chance to test on other +machines, but I'm fairly certain there are bits that won't run. + +To make the full set of images you will need a lot of disk space - +each CD image will take up ~600MB. And of course you'll need the +mirror itself for the files. But this no longer has to be local - see +"Making a symlink-farm" below. + +In terms of other software, you'll need + + perl + bash + sed + awk (any awk should do) + +These _should_ be standard on any Linux system. You'll also need: + + mkisofs/mkhybrid (a recent version - the standard one in Debian slink + should do) + + a PATCHED mkhybrid (if you want to use the symlink-farm method - see below) + + slice (to create the slink1.needed file from master) + + dpkg-multicd (VERY Debian-specific. Maybe it will work on other systems, + but I don't know and you'll probably have to play with it) + + cdwrite/cdrecord (to write the images once you've created them. They will + be standard ISO images, so even most *spit* Windoze CD + creation programs should be able to write them at a + push.) + sysutils + pkg-order + dpkg-perl + unzip (for i386 bootable CDs) + lha (for m68k CDs) + silo (if you want to create sparc disks - this may be problematic + on non-sparc machines) + isomarkboot (for alpha CDs - source is in the aboot package, binaries + for i386 and alpha are contained in this tar file) + m68k-cd-misc.tar.gz (from the same place you got this package, + for m68k CDs. Copy it to $BASEDIR before you start.) + hfsutils (for Mac stuff on m68k CDs) + +There may be other things too, but for now these are all I can think of. + +How do I use it? +================ +To be reading this, you must have extracted the tar file. Good +start. Next what you need to do is: + + customise the file lists (slink.{needed,useful,list}) if necessary + edit slink.info (dselect multicd disk info) + list any extras in slink.extras + edit slink.volid (ISO VOLID) + edit mkisofsrc (other ISO headers) + list any packages to be excluded in exclude-$ARCH if necessary + set up parameters in slink_cd or in the environment + run slink_cd with appropriate parameters + +Huh? +==== +Customise the file lists if you want to. The lists distributed with +this program should work for most people, and will be the basis of the +official Debian slink CD images when they are made. + +The (Debian) contents of discs 1 and 2 are calculated at run-time to +match as closely as possible the list of files needed by the Debian +install programs, and then the rest of the packages are split +(hopefully) sensibly. If you wish to produce a single standalone disc +of the key parts of Debian, this is easy - see "Single Debian discs" +below. If you want to create more complete sets, this is also easy. + +The file "master" lists the packages that are REQUIRED for all the +standard suggested systems to work at first install. These packages +come to about 300MB in total. The file "slink1.useful" contains a list +of further packages that I and others thought should also go on the +first disc and these take about 220MB more. This second list can +easily be modified if you so desire, but if you do please be careful +that the dependencies are met, as I did. The package "pkg-order" is +very useful here. When the lists for disc 1 is created, these packages +plus any others of "important", "standard" or "required" priority will +be marked to go on disc 1. The rest of the binary packages from the +main section will go onto disc 2, taking about 325 MB. + +And, finally, list the packages you want to _completely_ exclude from +the CDs in exclude-$ARCH. Reasons for doing this may include unmet +dependencies, broken packages, broken Packages files etc. + +Beyond this list of packages, the rest of the specification is quite +easy. For each disc, a file slink.list should contain a list of +files to go onto that disc. These can list directories or files, +either will work. The standard layout will look something like: + + 1: main binary-ARCH section 1 + docs + install stuff + boot disks + 2: main binary-ARCH section 2 + contrib (binary-ARCH and source) + (OPTIONAL) non-US (binary-ARCH and source) + project + 3: main source section 1 + 4: main source section 2 + 5: (OPTIONAL) non-free (binary-ARCH and source) + +* ARCH is a special keyword - see below for more info. + +============================================================================= +NOTE: The non-free section is not part of Debian and the programs contained + within are not endorsed by Debian, but they have been packaged as a + service to our users who may still need them until free alternatives + have been made available. +============================================================================= + +The non-US section is slightly complicated by the fact that in most +cases it will have to be mirrored separately, as the main Debian +servers in the USA cannot legally export this software. More on +the non-US configuration later. + +To generate the 5th (non-free) CD you will need to specify "non-free" +as a command-line option when running slink_cd. To add the non-US +section on disk 2 you will need to specify "non-US" as an option. + +Other things to be configured: + +The dselect (installation) multi-cd install method uses the contents +of a file .disk/info on each CD when determining the contents of a +disc and in deciding which discs are needed. The .info file for each +disc will be created using slink.info. Edit these accordingly, and +the date will automatically be added by the script when used. + +Extra files may be added to each disc if you desire. Many OEM +producers of Debian CDs may want to use this - it allows you to +customise the contents of your CDs, for example if you wish to add +extra software of your own or other local content. Simply list them in +slink.extras. + +The CD Volume ID for each disk will be created from the contents of +slink.volid. + +If you wish to configure other options in the CD ISO headers, edit +mkisofsrc. See the mkhybrid/mkisofs documentation for more details. + +============================================================================= + Working examples for all of these files are given. +============================================================================= + +* In ALL of these files, the keyword "ARCH" is magic and will be + replaced by the appropriate architecture (i386,m68k,powerpc,sparc,alpha) + when you run the scripts here. This makes it easier to produce images for + several platforms in one run. + +e.g. in slink1.list: + + dists/slink/main/binary-ARCH/Release + + will become + + dists/slink/main/binary-i386/Release + +when run to produce i386 disks. + +The other things to configure are found in the main slink_cd script itself: + +ARCH - the target architecture +MIRROR - the location of your Debian mirror +NONUS - the location of the non-US part of your Debian mirror, + if applicable +MKISOFS - the location of your mkisofs/mkhybrid program +MKISOFS_OPTS - the options to use with your mkisofs/mkhybrid program +TDIR - the location of the temporary directory to use. This must be + on the same partition as your mirror, unless you use the + "genlinks" option to create a sym-link farm (below) +OUT - the directory in which we should write the completed images +BOOTDIR - (sparc specific) - where do we find silo? + +All of these can be changed by using environment variables, which is +especially useful when making CDs for multiple architecture in one +run. See the "arch" script for an example of this. + +Making a sym-link farm +====================== +When slink_cd is run, temporary trees/files will be made under +$TDIR. This no longer MUST be on the same partition as the mirror, +for the hard-links hack to work. There is now a new option, +"genlinks", which will create a tree of sym-links for you from a +mirror elsewhere, be it scattered across several mount points (small +disks) or mounted readonly via NFS from another machine. The CD images +can then be created from the sym-link farm. There are a couple of +limitations to this method, so the original hard-links method will +still be preferred and is the default. These limitations are: + +speed: the sym-links method is much slower, for a variety of reasons +reliability: the final "du" output of the script is no use with sym-links, + so you will probably have to create the CD images to make sure + all is well in testing. +compatibility: the hard-links method will work with any recent version of + mkhybrid/mkisofs, but to use the sym-links method you need a + specially patched version of mkhybrid. + +There is a patch for mkhybrid 1.12a4.7 included with this +program. Grab the original source from +http://www.ps.ucl.ac.uk/~jcpearso/mkhybrid.html or +http://www.chiark.greenend.org.uk/~stevem/DebianCD/ . There is also a +statically-linked i386 binary at the latter site. You will also need +to add the "-F" option to the mkhybrid command line for this sym-links +hack to work. + +Non-US +====== +To make Debian CDs with the non-US section you will need to specify +the location of your non-US mirror, and also add "non-US" to the +slink_cd command line. The default place for the non-US stuff is on +disc 2, but this can be changed. + +Non-free +======== +To make a set of Debian CDs with the non-free section you will need to +add "non-free" to the slink_cd command line. This will create a tree +etc. for the fifth disc, containing non-free. Attempting to create the +fifth disc without specifying "non-free" will fail. See the earlier +disclaimer about the non-free section. CD producers should definitely +read the copyrights of non-free packages to check they can sell them on +CD before doing so. Debian packages contain copyright information in +/usr/doc//copyright. + +Single Debian discs +=================== +Some producers may want to make single Debian CDs that will work on +their own without mentioning packages that would be on the other +CDs. The "single_disk" option should work for these people. And check +the extras lists above if you want to add more of your own +software/data to this single disc - the layout has been specifically +optimised so you have ~100MB of space there for you. Of course, this +layout will mean that many of the Debian binary packages will not be +packaged up and also there will be no source. Check the GPL and other +licenses to see what this means to you... + +Complete options list +===================== +You can specify any combination of steps to do on the command-line: + + clean removes old link trees + genlist creates a list of files optimised to make disc#1 as standalone + as possible, with ~100MB spare for local customisations + (see "extras"). Check the contents of "slink1.useful" - + this lists the Priority: optional main binary-$ARCH packages + that will be moved to CD#1. Also checks that the Packages file + is up-to-date (maybe not on a borken mirror) and creates a new + one if not. + genlinks creates a sym-link farm in $TDIR/tmp-mirror to work from + tree creates new link trees + single_disk makes a single disc (#1) which will stand alone (SEE BELOW) + flatten goes through the trees removing sym-links outside of the + selected dist + md5check checks the md5sums of all the packages and boot disks + in the trees + packages creates Packages.cd files to go on each CD, and then checks them + for consistency of dependencies + boot adds the bootable CD and install tools as appropriate + extras adds specified extras to the CDs (see below) + md5list creates a complete md5sum of each CD tree to go on the disk + images actually create all the ISO images. Make sure all the necessary + steps above have been run first, or these images may be + complete garbage + image Create image number x, where x is 1-4 or can also be 5 if + non-free is built. + imagesums Once the images are made, make md5sums of them into "MD5SUMS" + i386 targets binary-i386 + m68k targets binary-m68k + alpha targets binary-alpha + sparc targets binary-sparc + powerpc targets binary-powerpc + non-free adds the stuff for CD #5 (non-free) + non-US adds the non-US stuff for CD #2. + -v increments the debug level. Default level is 0, maximum is 3 + force_deps continue on even if the pkg-order check fails in "packages" + above. Use with care! + +N.B. "single_disk" should now be obsoleted due to changes in the +layouts, but should still work. + +If you specify no command-line options then the standard set of +commands (see below) will be done in order. THIS WILL NOT MAKE ANY +IMAGES. + +Some options will not work together. Some options depend on others +Some of these combinations are obvious, but in particular: + + "tree" needs "genlist" + "flatten" will not work with "genlinks" + "image5" needs "non-free" + "single_disk" will not work with "non-free" or "non-US" + "imagesums" needs at least one "image[12345x]" + +END. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..5a940b66 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,249 @@ +slink-cd (1.13) unstable; urgency=low + + * slink_cd changes: + * Link $TDIR/.mkisofsrc to .mkisofs - different versions of + mkhybrid/mksiofs need different versions. Thanks to Peter Kundrat + * Removed the now unnecessary frozen sym-link + * Put sym-links in doc/ for *.txt in /install, not *.doc + * Make sure the sparc install tree is in boot1 for CD 1 + * When generating md5lists, grep out things under the "dists/stable" + sym-link - we only need one copy of the md5 sum for each file... + * Fiddle with isomarkboot line for Alpha - it won't follow sym-links + * others: + * Added pkg-order to requirements in README + * Added details about isomarkboot in README + * Removed "rm -fr boot1" from boot-m68k that caused VME m68k + CDs not tbe made bootable + * other small fixes for boot-m68k + * minor patch for boot-sparc from Eric Delaunay: mount the loopback + image readonly + * Santiago Vila: mklist now makes sure all Section: base packages are + on CD 1, and I've added all the hamm base packages that still exist + in slink into useful so they will also go into CD 1. Avoid disc + swapping... + + -- Steve McIntyre Wed, 31 Mar 1999 17:43:22 +0100 + +slink-cd (1.12) unstable; urgency=low + + * slink_cd changes: + * use munged list files in $TDIR, not in $BASEDIR. Easier + for non-US removal... + * check for Release before playing with it + * fixed pkg-order usage - make sure it doesn't check installed + packages first + * added --netatalk option to MKISOFS_OPTS for m68k/powerpc (macs) + * fixed broken sparc changes from boot-ARCH split + * others: + * thinko in README.1ST.alpha - s/i386/alpha/ + * added hfsutils to README + * added README.1ST.sparc from Steve Dunham + * added more subarch support in boot-alpha + * fixed README.tools - update details of fips - in boot-i386 + * fixed boot-m68k; don't remove $INSTALLDIR before we start; it + contains useful stuff! + * moved amiga .info files around a little in boot-m68k + * added mac fork stuff in boot-m68k + * added macinstall-cd.tar.gz for mac forks + * updated exclude-alpha to match the released version + * updated exclude-sparc to match the released version + * updated master to match the released version + * fix mklist - slink is now stable, not frozen + * removed unnecessary slink?.list.1 files + * re-added non-US into slink2.list; will be removed at runtime + if necessary + * added newt0.25 and whiptail to useful - depends for pppconfig + + -- Steve McIntyre Fri, 12 Mar 1999 15:07:22 -0000 + +slink-cd (1.11) unstable; urgency=low + + * Mainly last-minute cleanups for final CD builds. + * slink_cd changes: + * Changed boot target slightly, less warnings on non-i386. + * Now using new isomarkboot, new options. + * others: + * Added sysutils and dpkg-perl to list of requirements in README. + * Added exclude details to README. + * boot-alpha changes from Loic. + * moved some i386-specific boot stuff to boot-i386. + * Fixed several small bugs/typos in boot-m68k. + * Added amiga .info files in boot-m68k, and tar file from Christian. + * Updated master file. + * Exclude support in mklist. + * Added exclude-$ARCH files. + * Fixed mklist bug - check right location for newer files. + * + + -- Steve McIntyre Sun, 07 Mar 1999 00:40:33 -0000 + +slink-cd (1.10) unstable; urgency=low + + * slink_cd changes: + * Very slight changes to date handling - previously we could have made + broken discs across midnight! + * slink1.useful is now generated from "useful" using slice - better for + multi-arch setup. + * Tiny cosmetic changes. + * Make sure the source discs are _identical_ for all the arches - no + arch-specific mentions/options anywhere now. + * Fix the Release files to say "stable" rather than "frozen". + * Check for zero-length files when md5dumming. + * Call custom version of pkg-order, we don't need to see conflicts list. + * Changed output image file names to include $ARCH for binary CDs. + * others: + * Fixed cut'n'paste errors in boot-alpha, now appears to work. + * Added missing " to boot-m68k, now works. + * Removed m68k.old - no longer necessary. + * Added custom version of pkg-order, with option not to check/display + conflicts. Patch sent upstream. + * Removed slink1.useful, replaced with slice input file "useful". + * Removed ARCH from slink[34].volid - no ARCH on source disks. + * Cosmetic changes to vecho. + + -- Steve McIntyre Wed, 03 Mar 1999 19:04:33 -0000 + +slink-cd (1.09) unstable; urgency=low + + * slink_cd changes: + * We can now cope with alpha disks! + * Moved the $mountpoint stuff to boot-sparc where it belongs. + * Redirect all pkg-order output to a file. + * Added extra "force_deps" option to continue even if pkg-order fails. + Use with care! + * Added pointer to slink_cd location to README.1ST. + * Changed use of TMPDIR to TDIR - apparently caused problems with + dpkg-deb on sparc. libc problem? + * others: + * Added boot-alpha script. + * Rewrote boot-m68k script in bash, the python one wouldn't work + with the mirror layout. + * Fixed boot-sparc, $mountpoint broke with split. + * Add more files to the .deb. + * Changed use of TMPDIR to TDIR for other files. + + -- Steve McIntyre Sun, 28 Feb 1999 15:26:58 -0000 + +slink-cd (1.08) unstable; urgency=low + + * slink_cd changes: + * Only put Packages files on binary CDs now, so we should get common + source disks. + * For i386, only use Joliet on binary CDs. Same reason. + * Munge packages files - each binary CD only know about itself and + earlier CDs - now single_disk is no longer necessary, as normal disc 1 + will do the same job. Users now need to be told to use the last disk + first on dselect "update" run. + * Moved partition checking a bit later - allow the script to create + TMPDIR if necessary before complaining it doesn't exist...! + * Check that "slice master" works before continuing. + * Copy on README.ARCH if it exists. + * Fixed thinko in source md5 checking - should now work again instead + of just dropping out. + * Moved vecho etc. definitions into a separate file, source it + where necessary. + * Split boot stuff off into separate scripts, one per arch. + * Added small extra stuff for m68k - boot vme stuff on CD 1. + * Moved volid-reading code to each image step, avoid errors. + * others: + * Created README.multicd explaining order of CDs. + * Changed *.info to now say ?/4 instead of ?/5 - only 4 official CDs. + * Created vecho - vecho definitions file. + * Altered mklist to use vecho. + * Created new boot-ARCH scripts for sparc and i386. + * Slightly modified Chris Lawrence's m68k install-disks python script + to do the same job, now called boot-m68k. + * Added ipx to slink1.useful, needed for ncpfs. How did this ever get + through? + * Updated to "master" version 1.26 1999/02/24. + + -- Steve McIntyre Thu, 25 Feb 1999 09:21:56 -0000 + +slink-cd (1.07) unstable; urgency=low + + * Almost ready for addition into slink for release. + * slink_cd changes: + * Build slink1.needed from "master" file from boot-floppies. + * Now uses pkg-order to check dependencies - check CD 1 doesn't depend + on any others, then check ALL Depends: and Recommends: . Fail if CD 1 + fails, if the whole set fails then either + a) give a warning about this if we haven't included non-free + or non-US (it's reasonable - contrib depends on non-free) + b) fail if we have. + * Added work-around for broken metro-motif-man package for the pkg-order + step. + * Added upgrade-2.0-i386 and upgrade-older-i386 links at top-level. + * Removed upgrade-i386 at top level. + * Added latest sparc patch from Steve Dunham + * others: + * Added README.1ST.m68k from Chris Lawrence . + * Removed slink1.needed from package, replaced with master. + * Added more upgrade stuff to slink1.list. + + -- Steve McIntyre Mon, 22 Feb 1999 18:38:50 -0000 + +slink-cd (1.06) unstable; urgency=low + + * slink_cd changes: + * handle non-US links better + * Copy Release Notes onto all CDs + * Create README.1ST - lists slink_cd version, creation date, disk label + (from .disk/info) and gives simple instructions on what to do to run + the installation system. + * Copy the full set of files for the installation manual to /install. + * Add sym-links for the installation manual into /doc. + * Added hfs.map stuff for Apple people. + * Added $MKISOFS_OPTS_DISC support, makes life easier for special + mkhybrid requirements for different arches. + * others: + * Changed the default volid for each disk to be + "Debian-ARCH 2.1 Disc " + * Created README.1ST.i386 - template for README.1ST above. + * Removed test genlinks option from arch. + * Added hfs.map for Apple people + * Added mkisofsrc to packaging. + + -- Steve McIntyre Thu, 11 Feb 1999 16:35:01 -0000 + +slink-cd (1.05) unstable; urgency=low + + * slink_cd changes: + * now uses a BASEDIR variable so you don't have to start in the + slink_cd directory. + * added more obvious pointers for -F flag for farmers. + * check for "$NU", not "$NONUS" when looking for non-US files + * cope with non-absolute paths; create things if necessary + * check we're using the -F mkhybrid option in genlinks + * remove the non-US entries from the list files if we're not using them + * fixed up the genlinks stuff to cope with a more convoluted tree; + seems slower... + * we don't need to do the sed thing twice for the volid files... + * others: + * arch no longer runs non-free by default + * added mkisofsrc to .deb package + * fixed mklinks regexp to be more careful on the binary-all links stage + * fixed mklinks regexp to be more careful on the current links stage + + -- Steve McIntyre Wed, 03 Feb 1999 17:38:53 -0000 + +slink-cd (1.04) unstable; urgency=low + + * slink_cd changes: + * mkisofs and options now separate (add -J for i386, not others) + * debug level now configurable, default output is now minimal + * single_disk should now work + * user-configurable mkisofsrc + * others: + * added extra packages to slink1.{needed,useful}, mainly for m68k + + -- Steve McIntyre Sat, 23 Jan 1999 00:21:38 -0000 + +slink-cd (1.03) unstable; urgency=low + + * Initial Release. + + -- Steve McIntyre Thu, 21 Jan 1999 00:01:58 -0000 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..baba2cd4 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: slink-cd +Section: contrib/utils +Priority: extra +Maintainer: Steve McIntyre +Standards-Version: 2.4.1.1 + +Package: slink-cd +Architecture: all +Depends: unzip, lha, dpkg-multicd, slice, pkg-order, python-base, macutils +Recommends: cdwrite|cdrecord, mkhybrid +Description: Build Debian slink CD images + slink_cd is the set of scripts used to generate Debian CDs from the archive. + Likely to be useful for vendors and any Debian users wanting to make their + own CDs. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..9f00b81a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +slink_cd was originally written and is maintained by Steve McIntyre +. Many others have contributed +patches. The license used is the + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + +You may apply this or any later version, at your option. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000..5c011386 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/man/man1 + diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..eec951b8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,145 @@ +#!/usr/bin/make -f +############################################################################## +# Generic debian/rules file. Based on: +# +#> Sample debian.rules file - for GNU Hello (1.3). +#> Copyright 1994,1995 by Ian Jackson. +#> I hereby give you perpetual unlimited permission to copy, +#> modify and relicense this file, provided that you do not remove +#> my name from the file itself. (I assert my moral right of +#> paternity under the Copyright, Designs and Patents Act 1988.) +# +# Heavily modified by Joey Hess +# +############################################################################## +# +# NOTE: You shouldn't have to edit this file. Edit debian/config instead. +# If you must edit this file to get your package to build properly, then +# I have failed. Let me know; mail jeh22@cornell.edu. +# +# (Currently not handled: multiple binary packages from 1 source package, +# and binary-indep rule.) +# +# NOTE: This file is designed so it doesn't need to be run as root. For +# actions that require that the user be root, the root password will be +# prompted for, if you're not already root. +# +############################################################################## + +# Include config file. +include debian/config + +# Generate a makefile (via configure scriopt or xmkmf). +makefile-stamp: + ifeq ($(strip $(use_imakefile)),y) + xmkmf -a + endif + $(use_configure) + touch makefile-stamp + +# Preserve some files that may get deleted/overwritten/modified otherwise. +preserve-stamp: + ifneq ($(strip $(preserve_files)),) + $(foreach file,$(preserve_files),-cp $(file) $(file).preserved) + endif + touch preserve-stamp + +build: preserve-stamp makefile-stamp + $(checkdir) + $(build_command) + touch build + +clean: preserve-stamp makefile-stamp + $(checkdir) + # Do actual cleaning up here. + -rm -f build + $(clean_command) + -rm -rf *~ debian/*~ debian/files* $(clean_files) + $(clean_tmp) + # Remove Makefile that xmkmf creates. + ifeq ($(strip $(use_imakefile)),y) + -rm -f Makefile + endif + # If we preserved some files, we need to restore them now. + ifneq ($(strip $(preserve_files)),) + $(foreach file,$(preserve_files),-mv -f $(file).preserved $(file)) + endif + -rm -f preserve-stamp makefile-stamp + +# Build architecture-independent files here. +# (not yet set up to be used) +binary-indep: build + $(checkdir) + +# Build architecture-dependent files here. +binary-arch: build + echo $(checkdir) + $(checkdir) + echo $(clean_tmp) + $(clean_tmp) + install -d debian/tmp debian/tmp/DEBIAN debian/tmp/usr/doc/$(package) + $(install_command) + # Compress manpages + -gzip -9v -r debian/tmp/usr/man/ debian/tmp/usr/X11R6/man/ + # Install documentation files, compressed. + ifneq ($(strip $(docs)),) + cp $(docs) debian/tmp/usr/doc/$(package) + gzip -9v debian/tmp/usr/doc/$(package)/* + endif + # Install copyright file, don't compress. + ifneq ($(strip $(copyright)),) + cp $(copyright) debian/tmp/usr/doc/$(package)/copyright + endif + # Install examples, compressed. + ifneq ($(strip $(examples)),) + install -d debian/tmp/usr/doc/examples/$(package) + cp $(examples) debian/tmp/usr/doc/examples/$(package) + gzip -9v debian/tmp/usr/doc/examples/$(package)/* + endif + # Install other debian files if they exist. + -install -m 644 debian/changelog debian/tmp/usr/doc/$(package)/changelog + -gzip -9v debian/tmp/usr/doc/$(package)/changelog + -install -m 644 debian/conffiles debian/tmp/DEBIAN/conffiles + -install -m 755 debian/preinst debian/tmp/DEBIAN/preinst + -install -m 755 debian/postinst debian/tmp/DEBIAN/postinst + -install -m 755 debian/prerm debian/tmp/DEBIAN/prerm + -install -m 755 debian/postrm debian/tmp/DEBIAN/postrm + # Generate control file. + dpkg-shlibdeps $(binfiles) + dpkg-gencontrol + # Set permissions. + [ "`whoami`" != root ] && \ + echo -e "\n ** Enter root password to set file permissions."; \ + debian/rules setperms +# echo debian/rules setperms +# su -c "debian/rules setperms" + # Actually build the .deb file. + echo dpkg --build debian/tmp .. + dpkg --build debian/tmp .. + +# This must be run suid root, it sets the file permissions in debian/tmp +setperms: + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + $(ch_commands) + +define checkdir + @test -f $(test_file) -a -f debian/rules || (echo -e "\n\ + ** \"$(test_file)\" or \"debian/rules\" does not exist.\n\ + ** Either \"$(package)\" is not unpacked in this directory, or\n\ + ** an incorrect test_file is specified in debian/config.\n" && false) +endef + +# This rm's the debian/tmp directory. +define clean_tmp + -rm -rf debian/tmp >/dev/null 2>&1 + @if [ -d debian/tmp ]; then \ + if [ "`whoami`" != root ]; then \ + echo -e "\n ** Enter root password to remove debian/tmp."; \ + fi; \ + rm -rf debian/tmp; \ + fi +endef + +binary: binary-indep binary-arch +.PHONY: clean setperms binary