GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Digital_Repository
Browse code
- Corrected variable format.
master
1 parent
edf5e7a
commit
15097fad9d93ed8cb9c2b7ef4428bf61c8deab14
nstanger
authored
on 20 Jun 2007
Patch
Showing
3 changed files
OARiNZ/DIY/LiveCD/Makefile
OARiNZ/DIY/LiveCD/Makefile.chroot
OARiNZ/DIY/webmin-oarinz/Makefile
Ignore Space
Show notes
View
OARiNZ/DIY/LiveCD/Makefile
#!/usr/bin/make -f SHELL=/bin/sh # Version and filename info. VERSION=3.0 INSTANT_EPRINTS=Instant_EPrints_$(VERSION)_i386 UBUNTU=Ubuntu_6.10_i386 # Directories. LIVECD=livecd OLD_SQUASH=old-squashfs NEW_SQUASH=new-squashfs # Miscellaneous files. REMOVE_FILES=$(NEW_SQUASH)/etc/resolv.conf $(NEW_SQUASH)/etc/apt/apt.conf \ $(NEW_SQUASH)/Makefile.chroot $(NEW_SQUASH)/usr/sbin/policy-rc.d # Commands locations. ECHO=/bin/echo SUDO=/usr/bin/sudo RM=/bin/rm CP=/bin/cp MOUNT=/bin/mount UMOUNT=/bin/umount MKDIR=/bin/mkdir SED=/bin/sed DD=/bin/dd CHMOD=/bin/chmod .PHONY: filesystem squashfs iso cleanup # Build ISO image. iso: $(INSTANT_EPRINTS).iso $(INSTANT_EPRINTS).iso: $(LIVECD)/casper/filesystem.squashfs @$(ECHO) @$(ECHO) "=== BUILDING ISO IMAGE ===" @# Update live CD MD5 hash. We do a /bin/sh -c to run the find command @# so that we can use output redirection. Otherwise we'll get permission @# errors. @$(ECHO) @$(ECHO) "=== Updating live CD MD5 hash (takes about 1.5 minutes)." $(SUDO) $(RM) -f $(LIVECD)/md5sum.txt @$(ECHO) "find . -type f -print0 | xargs -0 md5sum > md5sum.txt" @cd $(LIVECD) && $(SUDO) /bin/sh -c \ '/usr/bin/find . -type f -print0 | xargs -0 md5sum > md5sum.txt' @# Create live CD ISO. @$(ECHO) @$(ECHO) "=== Building final ISO image (takes about 40 seconds)." $(SUDO) /usr/bin/mkisofs \ -o $@ \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ -r \ -V "Instant EPrints 3.0 i386" \ -cache-inodes \ -J \ -input-charset iso8859-1 \ -allow-leading-dots \ $(LIVECD) @$(ECHO) @$(ECHO) "=== Done!" # Build the new squashfs for the ISO. squashfs: $(LIVECD)/casper/filesystem.squashfs $(LIVECD)/casper/filesystem.squashfs: $(INSTANT_EPRINTS)_work.ext2 @$(ECHO) @$(ECHO) "=== BUILDING NEW SQUASHFS ===" @# Mount squashfs source filesystem and set up work environment. @$(ECHO) @$(ECHO) "=== Initialising." @$(SUDO) $(MOUNT) -o loop $< $(NEW_SQUASH) $(SUDO) $(CP) -p /etc/resolv.conf $(NEW_SQUASH)/etc $(SUDO) $(MOUNT) -t proc --bind /proc $(NEW_SQUASH)/proc @# Copy in cached .deb files to save on downloads and set up apt @# sources, etc. An appropriate sources.list can be generated @# using the utility at http://www.ubuntu-nl.org/source-o-matic/. @$(ECHO) @$(ECHO) "=== Setting up apt (takes about 10 seconds)." $(SUDO) $(CP) -a apt-cache/. $(NEW_SQUASH)/var/cache/apt/archives @# HACK: I've been having problems with the update servers. Since it @# takes so long to get back to this point in the process, I've @# cheated and pre-generated the various index files. Just drop 'em @# in! They should be safe to leave there afterwards. $(SUDO) $(CP) -a apt-lists/. $(NEW_SQUASH)/var/lib/apt/lists $(SUDO) $(CP) -p /etc/apt/apt.conf $(NEW_SQUASH)/etc/apt $(SUDO) $(CP) sources.list $(NEW_SQUASH)/etc/apt @# The following stops the daemons from attempting to restart, which @# will fail miserably in a chroot environment. Make sure to set the @# permissions correctly, just in case they've been eaten by CVS or @# something. $(SUDO) $(CP) policy-rc.d $(NEW_SQUASH)/usr/sbin $(SUDO) $(CHMOD) 755 $(NEW_SQUASH)/usr/sbin/policy-rc.d @# Finally, preseed the debconf database so that we don't get asked @# any annoying configuration questions during installs. $(SUDO) $(CP) -a debconf-db/. $(NEW_SQUASH)/var/cache/debconf @# Chroot to the squashfs source filesystem and reconfigure @# installed packages. Note that we need to stop Webmin for the @# duration, otherwise installing Webmin in the chroot fails ("port @# 10000 is already in use"). @$(ECHO) @$(ECHO) "=== Reconfiguring installed packages (takes about 2.5 minutes)." @-$(SUDO) /etc/init.d/webmin stop @$(SUDO) $(CP) Makefile.chroot $(NEW_SQUASH) @$(SUDO) chroot $(NEW_SQUASH) /usr/bin/env HOME=/root LC_ALL=C \ DEBIAN_FRONTEND=noninteractive make -f Makefile.chroot @-$(SUDO) /etc/init.d/webmin start @# Clean up. @$(ECHO) @$(ECHO) "=== Cleaning up." $(SUDO) $(UMOUNT) $(NEW_SQUASH)/proc $(SUDO) $(RM) -f $(REMOVE_FILES) $(SUDO) $(RM) -rf $(NEW_SQUASH)/tmp/* @# Update manifest and disk name. @$(ECHO) @$(ECHO) "=== Updating manifest and disk name." $(SED) -ie 's/DISKNAME .*/DISKNAME Instant EPrints 3.0 - i386/' \ $(LIVECD)/README.diskdefines $(SUDO) chroot $(NEW_SQUASH) \ dpkg-query -W --showformat='$(Package) $(Version)\n' \ > $(LIVECD)/casper/filesystem.manifest $(SUDO) $(CP) $(LIVECD)/casper/filesystem.manifest \ $(LIVECD)/casper/filesystem.manifest-desktop $(SED) -ie '/ubiquity/d' $(LIVECD)/casper/filesystem.manifest-desktop @# Clear free space on the squashfs source filesystem. @$(ECHO) @$(ECHO) "=== Clearing free space on new squashfs." -$(SUDO) $(DD) if=/dev/zero of=$(NEW_SQUASH)/dummyfile $(SUDO) $(RM) $(NEW_SQUASH)/dummyfile @# Regenerate the live CD squashfs. @$(ECHO) @$(ECHO) "=== Building new squashfs (takes about 10 minutes)." $(SUDO) $(RM) -f $@ $(SUDO) mksquashfs $(NEW_SQUASH) $@ @# Unmount the squashfs source filesystem. @$(SUDO) $(UMOUNT) $(NEW_SQUASH) @$(ECHO) @$(ECHO) "=== Done!" $(INSTANT_EPRINTS)_work.ext2: $(INSTANT_EPRINTS).ext2 @$(ECHO) @$(ECHO) "=== Making working copy of original filesystem (takes about 2.5 minutes)." $(SUDO) $(CP) $< $@ # Build source filesystem. filesystem: $(INSTANT_EPRINTS).ext2 $(INSTANT_EPRINTS).ext2: $(UBUNTU).iso @$(ECHO) @$(ECHO) "=== BUILDING SOURCE FILESYSTEM ===" @# Make a copy of the original ISO. @$(ECHO) @$(ECHO) "=== Copying original ISO (takes about 30 seconds)." @$(SUDO) $(MOUNT) -t iso9660 -o loop $< /cdrom @$(MKDIR) -p $(LIVECD) $(SUDO) $(RM) -rf $(LIVECD)/* $(CP) -a /cdrom/. $(LIVECD) $(CHMOD) -R u+w $(LIVECD) @$(SUDO) $(UMOUNT) /cdrom @# Remove unnecessary Windows cruft. @$(ECHO) @$(ECHO) "=== Removing "`/usr/bin/du -smh $(LIVECD)/programs | /usr/bin/cut -d'M' -f1`"MiB of unnecessary Windows crud." $(RM) -rf $(LIVECD)/programs @# Mount original compressed filesystem. @$(MKDIR) -p $(OLD_SQUASH) @$(SUDO) $(MOUNT) -t squashfs -o loop,ro \ $(LIVECD)/casper/filesystem.squashfs $(OLD_SQUASH) @# Create image for new compressed filesystem. Add on an extra 500MiB @# to allow for the temporary files that we're going to copy in (mostly @# cached .deb files. @$(ECHO) @$(ECHO) "=== Creating new 2.5 GiB blank file system (takes about 1.5 minutes)." $(SUDO) $(DD) if=/dev/zero \ of=$@ bs=1M count=2500 $(SUDO) mke2fs -F -q $@ @# Mount new compressed filesystem. @$(MKDIR) -p $(NEW_SQUASH) @$(SUDO) $(MOUNT) -o loop $@ $(NEW_SQUASH) @# Copy the old compressed filesystem. @$(ECHO) @$(ECHO) "=== Copying original compressed filesystem (takes about 2.5 minutes)." $(SUDO) $(CP) -a $(OLD_SQUASH)/. $(NEW_SQUASH) @# Unmount all compressed filesystems. @$(SUDO) $(UMOUNT) $(OLD_SQUASH) @$(SUDO) $(UMOUNT) $(NEW_SQUASH) @$(ECHO) @$(ECHO) "=== Done!" # Unmount everything that might be mounted. Useful if the make dies partway # through. cleanup: @$(ECHO) @$(ECHO) "=== Cleaning up mounted items." -$(SUDO) $(UMOUNT) $(NEW_SQUASH)/proc -$(SUDO) $(UMOUNT) $(NEW_SQUASH) -$(SUDO) $(UMOUNT) $(OLD_SQUASH) -$(SUDO) $(UMOUNT) /cdrom
#!/usr/bin/make -f SHELL=/bin/sh # Version and filename info. VERSION=3.0 INSTANT_EPRINTS=Instant_EPrints_${VERSION}_i386 UBUNTU=Ubuntu_6.10_i386 # Directories. LIVECD=livecd OLD_SQUASH=old-squashfs NEW_SQUASH=new-squashfs # Miscellaneous files. REMOVE_FILES=${NEW_SQUASH}/etc/resolv.conf ${NEW_SQUASH}/etc/apt/apt.conf \ ${NEW_SQUASH}/Makefile.chroot ${NEW_SQUASH}/usr/sbin/policy-rc.d # Commands locations. ECHO=/bin/echo SUDO=/usr/bin/sudo RM=/bin/rm CP=/bin/cp MOUNT=/bin/mount UMOUNT=/bin/umount MKDIR=/bin/mkdir SED=/bin/sed DD=/bin/dd CHMOD=/bin/chmod .PHONY: filesystem squashfs iso cleanup # Build ISO image. iso: ${INSTANT_EPRINTS}.iso ${INSTANT_EPRINTS}.iso: ${LIVECD}/casper/filesystem.squashfs @${ECHO} @${ECHO} "=== BUILDING ISO IMAGE ===" @# Update live CD MD5 hash. We do a /bin/sh -c to run the find command @# so that we can use output redirection. Otherwise we'll get pe${RM}ission @# errors. @${ECHO} @${ECHO} "=== Updating live CD MD5 hash (takes about 1.5 minutes)." @cd ${LIVECD} ${SUDO} ${RM} -f md5sum.txt @${ECHO} "find . -type f -print0 | xargs -0 md5sum > md5sum.txt" @${SUDO} /bin/sh -c '/usr/bin/find . -type f -print0 | xargs -0 md5sum > md5sum.txt' @cd .. @# Create live CD ISO. @${ECHO} @${ECHO} "=== Building final ISO image (takes about 40 seconds)." ${SUDO} /usr/bin/mkisofs \ -o $@ \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ -r \ -V "Instant EPrints 3.0 i386" \ -cache-inodes \ -J \ -input-charset iso8859-1 \ -allow-leading-dots \ ${LIVECD} @${ECHO} @${ECHO} "=== Done!" # Build the new squashfs for the ISO. squashfs: ${LIVECD}/casper/filesystem.squashfs ${LIVECD}/casper/filesystem.squashfs: ${INSTANT_EPRINTS}_work.ext2 @${ECHO} @${ECHO} "=== BUILDING NEW SQUASHFS ===" @# Mount squashfs source filesystem and set up work environment. @${ECHO} @${ECHO} "=== Initialising." @${SUDO} ${MOUNT} -o loop $< ${NEW_SQUASH} ${SUDO} ${CP} -p /etc/resolv.conf ${NEW_SQUASH}/etc ${SUDO} ${MOUNT} -t proc --bind /proc ${NEW_SQUASH}/proc @# Copy in cached .deb files to save on downloads and set up apt @# sources, etc. An appropriate sources.list can be generated @# using the utility at http://www.ubuntu-nl.org/source-o-matic/. @${ECHO} @${ECHO} "=== Setting up apt (takes about 10 seconds)." ${SUDO} ${CP} -a apt-cache/. ${NEW_SQUASH}/var/cache/apt/archives @# HACK: I've been having problems with the update servers. Since it @# takes so long to get back to this point in the process, I've @# cheated and pre-generated the various index files. Just drop 'em @# in! They should be safe to leave there afterwards. ${SUDO} ${CP} -a apt-lists/. ${NEW_SQUASH}/var/lib/apt/lists ${SUDO} ${CP} -p /etc/apt/apt.conf ${NEW_SQUASH}/etc/apt ${SUDO} ${CP} sources.list ${NEW_SQUASH}/etc/apt @# The following stops the daemons from attempting to restart, which @# will fail miserably in a chroot environment. Make sure to set the @# permissions correctly, just in case they've been eaten by CVS or @# something. ${SUDO} ${CP} policy-rc.d ${NEW_SQUASH}/usr/sbin ${SUDO} ${CHMOD} 755 ${NEW_SQUASH}/usr/sbin/policy-rc.d @# Finally, preseed the debconf database so that we don't get asked @# any annoying configuration questions during installs. ${SUDO} ${CP} -a debconf-db/. ${NEW_SQUASH}/var/cache/debconf @# Chroot to the squashfs source filesystem and reconfigure @# installed packages. Note that we need to stop Webmin for the @# duration, otherwise installing Webmin in the chroot fails ("port @# 10000 is already in use"). @${ECHO} @${ECHO} "=== Reconfiguring installed packages (takes about xx minutes)." @${SUDO} /etc/init.d/webmin stop @${SUDO} ${CP} Makefile.chroot ${NEW_SQUASH} time ${SUDO} chroot ${NEW_SQUASH} /usr/bin/env HOME=/root LC_ALL=C \ DEBIAN_FRONTEND=noninteractive make -f Makefile.chroot @${SUDO} /etc/init.d/webmin start @# Clean up. @${ECHO} @${ECHO} "=== Cleaning up." ${SUDO} ${UMOUNT} ${NEW_SQUASH}/proc ${SUDO} ${RM} -f ${REMOVE_FILES} ${SUDO} ${RM} -rf ${NEW_SQUASH}/tmp/* @# Update manifest and disk name. @${ECHO} @${ECHO} "=== Updating manifest and disk name." ${SED} -ie 's/DISKNAME .*/DISKNAME Instant EPrints 3.0 - i386/' \ ${LIVECD}/README.diskdefines ${SUDO} chroot ${NEW_SQUASH} \ dpkg-query -W --showformat='${Package} ${Version}\n' \ > ${LIVECD}/casper/filesystem.manifest ${SUDO} ${CP} ${LIVECD}/casper/filesystem.manifest \ ${LIVECD}/casper/filesystem.manifest-desktop ${SED} -ie '/ubiquity/d' ${LIVECD}/casper/filesystem.manifest-desktop @# Clear free space on the squashfs source filesystem. @${ECHO} @${ECHO} "=== Clearing free space on new squashfs." -${SUDO} ${DD} if=/dev/zero of=${NEW_SQUASH}/dummyfile ${SUDO} ${RM} ${NEW_SQUASH}/dummyfile @# Regenerate the live CD squashfs. @${ECHO} @${ECHO} "=== Building new squashfs (takes about 10 minutes)." ${SUDO} ${RM} -f $@ ${SUDO} mksquashfs ${NEW_SQUASH} $@ @# Unmount the squashfs source filesystem. @${SUDO} ${UMOUNT} ${NEW_SQUASH} @${ECHO} @${ECHO} "=== Done!" ${INSTANT_EPRINTS}_work.ext2: ${INSTANT_EPRINTS}.ext2 @${ECHO} @${ECHO} "=== Making working copy of original filesystem (takes about 2.5 minutes)." ${SUDO} ${CP} $< $@ # Build source filesystem. filesystem: ${INSTANT_EPRINTS}.ext2 ${INSTANT_EPRINTS}.ext2: ${UBUNTU}.iso @${ECHO} @${ECHO} "=== BUILDING SOURCE FILESYSTEM ===" @# Make a copy of the original ISO. @${ECHO} @${ECHO} "=== Copying original ISO (takes about 30 seconds)." @${SUDO} ${MOUNT} -t iso9660 -o loop $< /cdrom @${MKDIR} -p ${LIVECD} ${SUDO} ${RM} -rf ${LIVECD}/* ${CP} -a /cdrom/. ${LIVECD} ${CHMOD} -R u+w ${LIVECD} @${SUDO} ${UMOUNT} /cdrom @# Remove unnecessary Windows cruft. @${ECHO} @${ECHO} "=== Removing "`/usr/bin/du -smh ${LIVECD}/programs | /usr/bin/cut -d'M' -f1`"MiB of unnecessary Windows crud." ${RM} -rf ${LIVECD}/programs @# Mount original compressed filesystem. @${MKDIR} -p ${OLD_SQUASH} @${SUDO} ${MOUNT} -t squashfs -o loop,ro \ ${LIVECD}/casper/filesystem.squashfs ${OLD_SQUASH} @# Create image for new compressed filesystem. Add on an extra 500MiB @# to allow for the temporary files that we're going to copy in (mostly @# cached .deb files. @${ECHO} @${ECHO} "=== Creating new 2.5 GiB blank file system (takes about 1.5 minutes)." ${SUDO} ${DD} if=/dev/zero \ of=$@ bs=1M count=2500 ${SUDO} mke2fs -F -q $@ @# Mount new compressed filesystem. @${MKDIR} -p ${NEW_SQUASH} @${SUDO} ${MOUNT} -o loop $@ ${NEW_SQUASH} @# Copy the old compressed filesystem. @${ECHO} @${ECHO} "=== Copying original compressed filesystem (takes about 2.5 minutes)." ${SUDO} ${CP} -a ${OLD_SQUASH}/. ${NEW_SQUASH} @# Unmount all compressed filesystems. @${SUDO} ${UMOUNT} ${OLD_SQUASH} @${SUDO} ${UMOUNT} ${NEW_SQUASH} @${ECHO} @${ECHO} "=== Done!" # Unmount everything that might be mounted. Useful if the make dies partway # through. cleanup: @${ECHO} @${ECHO} "=== Cleaning up mounted items." -${SUDO} ${UMOUNT} ${NEW_SQUASH}/proc -${SUDO} ${UMOUNT} ${NEW_SQUASH} -${SUDO} ${UMOUNT} ${OLD_SQUASH} -${SUDO} ${UMOUNT} /cdrom
Ignore Space
Show notes
View
OARiNZ/DIY/LiveCD/Makefile.chroot
#!/usr/bin/make -f SHELL=/bin/sh # Directories. APT_CACHE=/var/cache/apt/archives # Commands. APTGET=/usr/bin/apt-get -q APTGET_REM=$(APTGET) remove --purge --assume-yes APTGET_INS=$(APTGET) install --assume-yes DPKG=/usr/bin/dpkg # Packages to be removed using apt-get. Note that some additional # dependent packages will be automatically removed as well. REM_MISC=diveintopython ubuntu-artwork ubuntu-docs gaim gaim-data \ screensaver-default-images sound-juicer totem-gstreamer \ totem-mozilla totem rhythmbox linux-headers-2.6.17-10 \ linux-headers-2.6.17-10-generic linux-headers-generic \ xsane-common REM_GNOME=gnome-games gnome-games-data gnome2-user-guide REM_OPENOFFICE=openoffice.org openoffice.org-base openoffice.org-calc \ openoffice.org-common openoffice.org-core openoffice.org-draw \ openoffice.org-evolution openoffice.org-gnome openoffice.org-gtk \ openoffice.org-help-en-us openoffice.org-impress \ openoffice.org-java-common openoffice.org-l10n-common \ openoffice.org-l10n-en-gb openoffice.org-l10n-en-za \ openoffice.org-math openoffice.org-style-default \ openoffice.org-style-industrial openoffice.org-thesaurus-en-us \ openoffice.org-writer python-uno REM_EVOLUTION=evolution evolution-data-server evolution-data-server-common \ evolution-exchange evolution-plugins evolution-webcal nautilus-sendto REM_GIMP=gimp gimp-data gimp-print gimp-python libgimp2.0 # Packages to be added using apt-get. Some may already be installed, # but that's OK, it won't hurt. It's safer than assuming they're there # and getting it wrong! These will most likely install some other # dependent packages as well. ADD_EPRINTS=apache2 mysql-server perl libapache2-mod-perl2 \ libunicode-string-perl libdbi-perl libdbd-mysql-perl \ libxml-parser-perl wget tar gzip unzip poppler-utils wv lynx \ tetex-bin imagemagick adduser findutils postfix ADD_WEBMIN=bash perl libnet-ssleay-perl openssl libauthen-pam-perl \ libpam-runtime libio-pty-perl libmd5-perl ADD_ECONFIG=perl libxml-dom-perl libppi-perl libstring-random-perl \ libexpect-perl libunicode-string-perl libhtml-parser-perl \ libmail-rfc822-address-perl libjson-perl ADD_MISC=openssh-server # Local packages to be installed using dpkg. DEB_PACKAGES=eprints_3.0-0ubuntu1_all.deb \ oarinz-eprints-config_0.0.1-2_all.deb \ webmin-oarinz_1.340-0ubuntu1_all.deb \ webmin-eprints_0.0.1-1_all.deb .PHONY: all add remove dpkg-add all: remove add dpkg-add cleanup remove: @echo @echo "=== Removing unnecessary packages." $(APTGET_REM) $(REM_OPENOFFICE) @rm -rf /etc/openoffice $(APTGET_REM) $(REM_EVOLUTION) $(APTGET_REM) $(REM_GIMP) $(APTGET_REM) $(REM_GNOME) $(APTGET_REM) $(REM_MISC) add: @echo @echo "=== Adding prerequisite packages." @# Normally you'd apt-get update here, but I've been having @# problems with the servers. Since it takes so long to get @# back to this point in the process, I've cheated and pre-generated @# the cache index files. They were copied in before this Makefile @# was called. @#$(APTGET) update $(APTGET_INS) $(ADD_EPRINTS) $(APTGET_INS) $(ADD_WEBMIN) $(APTGET_INS) $(ADD_ECONFIG) $(APTGET_INS) $(ADD_MISC) dpkg-add: @echo @echo "=== Adding EPrints packages." # In order: eprints, webmin, oarinz-eprints-config, webmin-eprints $(DPKG) -i $(APT_CACHE)/eprints_3.0-0ubuntu1_all.deb $(DPKG) -i $(APT_CACHE)/webmin-oarinz_1.340-0ubuntu1_all.deb $(DPKG) -i $(APT_CACHE)/oarinz-eprints-config_0.0.1-2_all.deb $(DPKG) -i $(APT_CACHE)/webmin-eprints_0.0.1-1_all.deb cleanup: @echo @echo "=== Cleaning up." $(APTGET) clean $(APTGET) autoclean
#!/usr/bin/make -f SHELL=/bin/sh # Directories. APT_CACHE=/var/cache/apt/archives # Commands. APTGET=/usr/bin/apt-get -q APTGET_REM=${APTGET} remove --purge --assume-yes APTGET_INS=${APTGET} install --assume-yes DPKG=/usr/bin/dpkg # Packages to be removed using apt-get. Note that some additional # dependent packages will be automatically removed as well. REM_MISC=diveintopython ubuntu-artwork ubuntu-docs gaim gaim-data \ screensaver-default-images sound-juicer totem-gstreamer \ totem-mozilla totem rhythmbox linux-headers-2.6.17-10 \ linux-headers-2.6.17-10-generic linux-headers-generic \ xsane-common REM_GNOME=gnome-games gnome-games-data gnome2-user-guide REM_OPENOFFICE=openoffice.org openoffice.org-base openoffice.org-calc \ openoffice.org-common openoffice.org-core openoffice.org-draw \ openoffice.org-evolution openoffice.org-gnome openoffice.org-gtk \ openoffice.org-help-en-us openoffice.org-impress \ openoffice.org-java-common openoffice.org-l10n-common \ openoffice.org-l10n-en-gb openoffice.org-l10n-en-za \ openoffice.org-math openoffice.org-style-default \ openoffice.org-style-industrial openoffice.org-thesaurus-en-us \ openoffice.org-writer python-uno REM_EVOLUTION=evolution evolution-data-server evolution-data-server-common \ evolution-exchange evolution-plugins evolution-webcal nautilus-sendto REM_GIMP=gimp gimp-data gimp-print gimp-python libgimp2.0 # Packages to be added using apt-get. Some may already be installed, # but that's OK, it won't hurt. It's safer than assuming they're there # and getting it wrong! These will most likely install some other # dependent packages as well. ADD_EPRINTS=apache2 mysql-server perl libapache2-mod-perl2 \ libunicode-string-perl libdbi-perl libdbd-mysql-perl \ libxml-parser-perl wget tar gzip unzip poppler-utils wv lynx \ tetex-bin imagemagick adduser findutils postfix ADD_WEBMIN=bash perl libnet-ssleay-perl openssl libauthen-pam-perl \ libpam-runtime libio-pty-perl libmd5-perl ADD_ECONFIG=perl libxml-dom-perl libppi-perl libstring-random-perl \ libexpect-perl libunicode-string-perl libhtml-parser-perl ADD_MISC=openssh-server # Local packages to be installed using dpkg. DEB_PACKAGES=eprints_3.0-0ubuntu1_all.deb \ oarinz-eprints-config_0.0.1-2_all.deb \ webmin_1.340_all.deb \ webmin-eprints_0.0.1-1_all.deb .PHONY: all add remove dpkg-add all: remove add dpkg-add cleanup remove: @echo @echo "=== Remove packages here." ${APTGET_REM} ${REM_OPENOFFICE} ${APTGET_REM} ${REM_EVOLUTION} ${APTGET_REM} ${REM_GIMP} ${APTGET_REM} ${REM_GNOME} ${APTGET_REM} ${REM_MISC} add: @echo @echo "=== Add apt-get packages here." @# Normally you'd apt-get update here, but I've been having @# problems with the servers. Since it takes so long to get @# back to this point in the process, I've cheated and pre-generated @# the cache index files. They were copied in before this Makefile @# was called. @#${APTGET} update ${APTGET_INS} ${ADD_EPRINTS} ${APTGET_INS} ${ADD_WEBMIN} ${APTGET_INS} ${ADD_ECONFIG} ${APTGET_INS} ${ADD_MISC} dpkg-add: @echo @echo "=== Add dpkg packages here." # In order: eprints, webmin, oarinz-eprints-config, webmin-eprints ${DPKG} -i ${APT_CACHE}/eprints_3.0-0ubuntu1_all.deb ${DPKG} -i ${APT_CACHE}/webmin_1.340_all.deb ${DPKG} -i ${APT_CACHE}/oarinz-eprints-config_0.0.1-2_all.deb ${DPKG} -i ${APT_CACHE}/webmin-eprints_0.0.1-1_all.deb cleanup: ${APTGET} clean ${APTGET} autoclean
Ignore Space
Show notes
View
OARiNZ/DIY/webmin-oarinz/Makefile
#!/usr/bin/make -f SHELL=/bin/sh VERSION=1.340-0ubuntu1 .PHONY: source binary source-unsigned source-signed clean binary: webmin-oarinz_$(VERSION).dsc sudo pbuilder build *.dsc cp /var/cache/pbuilder/result/webmin-oarinz_$(VERSION)_all.deb . source: source-unsigned source-unsigned: cd webmin-oarinz-1.340 && debuild -S -us -uc -iCVS source-signed: cd webmin-oarinz-1.340 && debuild -S -k402A6FAF -iCVS clean: rm -f *.diff.gz *.dsc *.deb *.build *.changes
#!/usr/bin/make -f SHELL=/bin/sh VERSION=1.340-0ubuntu1 .PHONY: source binary source-unsigned source-signed clean binary: webmin-oarinz_${VERSION}.dsc sudo pbuilder build *.dsc cp /var/cache/pbuilder/result/webmin-oarinz_${VERSION}_all.deb . source: source-unsigned source-unsigned: cd webmin-oarinz-1.340 && debuild -S -us -uc -iCVS source-signed: cd webmin-oarinz-1.340 && debuild -S -k402A6FAF -iCVS clean: rm -f *.diff.gz *.dsc *.deb *.build *.changes
Show line notes below