File: meta/lnx-bbc/Makefile
base-0 patch-1
Line 1Line 1
GARNAME = lnx-bbc
GARNAME = lnx-bbc
GARVERSION := $(shell date --iso-8601=seconds)
#GARVERSION := 2.0
DISTNAME := $(GARNAME)-$(shell date --iso-8601)
# LNX_VERSION, which is the LNX-BBC version number, is now set in
# package-api.mk; so is DISTNAME. If you're doing an official release,
# you need to look there. This information is made available to a
# running LNX system in /etc/lnx-release.
GARVERSION = $(LNX_VERSION)
CATEGORIES = meta
# MASTER_SITES =
CATEGORIES = meta
# MASTER_SITES =
DISTFILES = autorun.inf lnxbbc.htm bbc.css logo.png hash_search.c
#DISTFILES = autorun.inf lnxbbc.htm bbc.css logo.png
# PATCHFILES =
MAINTAINER = Seth Schoen <schoen@loyalty.org>
LICENSE = GPL
# PATCHFILES =
MAINTAINER = Seth Schoen <schoen@loyalty.org>
LICENSE = GPL
Line 16Line 18
This package creates an iso9660 filesystem image.
endef

This package creates an iso9660 filesystem image.
endef

LNX_FLAVOR = bbc

export LNX_FLAVOR

# Dependencies are of the form categorydir/packagedir
# LIBDEPS are for libraries, and DEPENDS are for everything else
LIBDEPS = crypto/openssl
DEPENDS = meta/singularity meta/lnx.img special/rawrite2 special/rawwritewin special/archivers-msdos special/docopen special/putty

BUILDDEPS = devel/ccache disk/cdrtools
SOURCE_LANGUAGES =
DEPENDS = meta/$(singularity_GARCH)-livecd
BUILDDEPS = devel/ccache #disk/cdrtools
# CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS = custom
# INSTALL_SCRIPTS = $(WORKSRC)/Makefile

# Singularity pruning
# CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS = custom
# INSTALL_SCRIPTS = $(WORKSRC)/Makefile

# Singularity pruning
#singularity_PRUNE_PATHS += $(docdir) ;uncomment to remove the lnx-bbc README's
#singularity_PRUNE_PATHS += $(docdir) ;uncomment to remove the lnx-bbc READMEs
singularity_PRUNE_PATHS += $(infodir)
singularity_PRUNE_PATHS += $(includedir)
singularity_PRUNE_PATHS += $(sourcedir)
singularity_PRUNE_PATHS += $(infodir)
singularity_PRUNE_PATHS += $(includedir)
singularity_PRUNE_PATHS += $(sourcedir)
Line 40Line 35
singularity_PRUNE_PATHS += /usr
singularity_PRUNE_PATHS += /boot/bzImage

singularity_PRUNE_PATHS += /usr
singularity_PRUNE_PATHS += /boot/bzImage

# FIXME: Not sure if this is the correct place for this. -NickM
singularity_PRUNE_PATHS += $(libdir)/mozilla-*/res/samples


singularity_PRUNE_SCRIPTS += strip
singularity_PRUNE_SCRIPTS += terminfo
singularity_PRUNE_SCRIPTS += xemacs-packages
singularity_PRUNE_SCRIPTS += strip
singularity_PRUNE_SCRIPTS += terminfo
singularity_PRUNE_SCRIPTS += xemacs-packages
Line 53Line 45
singularity_PRUNE_SCRIPTS += devel
singularity_PRUNE_SCRIPTS += superfluous-binaries

singularity_PRUNE_SCRIPTS += devel
singularity_PRUNE_SCRIPTS += superfluous-binaries

export singularity_PRUNE_PATHS singularity_PRUNE_SCRIPTS
singularity_FORMAT = cloop

export singularity_PRUNE_PATHS singularity_PRUNE_SCRIPTS singularity_FORMAT
# This should go before any hand-made rules.
include ../../gar.mk

pre-everything:
# This should go before any hand-made rules.
include ../../gar.mk

pre-everything:
        @echo "Building BBC image bbc-$(GARVERSION).iso."
        @echo -e "$(CLEAR)$(BLUEBG)$(BOLD)$(WHITE)Building LNX image $(YELLOW)$(GARNAME)-$(singularity_GARCH)-$(GARVERSION).iso.$(NORMALCOLOR)"
MEDIA = cdrom

MEDIA = cdrom

$(WORKDIR)/hash_search: $(WORKDIR)/hash_search.c
        $(CC) -O9 -o $(WORKDIR)/hash_search $(WORKDIR)/hash_search.c -lcrypto

build-custom: $(WORKDIR)/hash_search
        mkdir -p $(WORKDIR)/$(MEDIA)
        # for Nick's experiment
        mkdir -p $(WORKDIR)/$(MEDIA)/mnt
        # for Nate's experiment
        mkdir -p $(WORKDIR)/$(MEDIA)/dev
        mkdir -p $(WORKDIR)/$(MEDIA)/mnt/initrd
        mkdir -p $(WORKDIR)/$(MEDIA)/mnt/cloop
        cp $(DESTDIR)/lnx.img $(WORKDIR)/$(MEDIA)
        cp $(DESTDIR)/singularity $(WORKDIR)/$(MEDIA)
        cp $(lnximg_DESTDIR)/boot/cloop.o $(WORKDIR)/$(MEDIA)
        cp ../../CREDITS $(WORKDIR)/$(MEDIA)
        mkdir -p $(WORKDIR)/$(MEDIA)/rawrite
        mkdir -p $(WORKDIR)/$(MEDIA)/archivers
        mkdir -p $(WORKDIR)/$(MEDIA)/putty
        install $(DESTDIR)$(bindir)/RAWRITE2.EXE $(WORKDIR)/$(MEDIA)/rawrite
        install $(DESTDIR)$(bindir)/rawwritewin.exe $(DESTDIR)$(bindir)/diskio.dll $(WORKDIR)/$(MEDIA)/rawrite
        install $(DESTDIR)$(bindir)/gzip.exe $(DESTDIR)$(bindir)/tar.exe $(WORKDIR)/$(MEDIA)/archivers
        install $(DESTDIR)$(bindir)/putty.exe $(DESTDIR)$(bindir)/pscp.exe $(WORKDIR)/$(MEDIA)/putty
        install $(DESTDIR)$(bindir)/docopen.exe $(WORKDIR)/$(MEDIA)
        install -m 644 $(DOWNLOADDIR)/autorun.inf $(DOWNLOADDIR)/lnxbbc.htm $(DOWNLOADDIR)/bbc.css $(DOWNLOADDIR)/logo.png $(WORKDIR)/$(MEDIA)
        mkisofs -v -d -N -D -R -T -c boot.catalog -b lnx.img -A "Linux" -V "LNX-BBC" -P "version_$(GARVERSION)" -o $(WORKDIR)/bbc-STABLE-$(GARVERSION).iso $(WORKDIR)/$(MEDIA)
        # hack MD5 hash of resulting image to begin with "bbcbbc"
        # (when built with make_matching=1, hash_search will output the
        # unmodified original file if it is unable to find a match)
        # For an official release, change this to (e.g.) "bbc210"
        # The next three lines are purely cosmetic and don't do anything useful!
        echo Trying to hack MD5 hash of resulting image...
        $(WORKDIR)/hash_search bbcbbc 28 < $(WORKDIR)/bbc-STABLE-$(GARVERSION).iso > $(WORKDIR)/bbc-STABLE-$(GARVERSION).iso.hash
        mv $(WORKDIR)/bbc-STABLE-$(GARVERSION).iso.hash $(WORKDIR)/bbc-STABLE-$(GARVERSION).iso
build-custom:
        cp $(STAGINGDIR)/$(singularity_GARCH)-livecd/$(singularity_GARCH)-livecd.iso $(WORKDIR)/$(GARNAME)-$(singularity_GARCH)-$(GARVERSION).iso
        $(MAKECOOKIE)

super-clean:
        $(MAKECOOKIE)

super-clean: