diff options
-rw-r--r-- | eclass/flx-tools.eclass | 115 | ||||
-rw-r--r-- | flx/fs/Manifest | 2 | ||||
-rw-r--r-- | flx/fs/fs-0.ebuild | 37 | ||||
-rw-r--r-- | flx/fs/metadata.xml | 4 | ||||
-rw-r--r-- | flx/initramfs/Manifest | 2 | ||||
-rw-r--r-- | flx/initramfs/initramfs-0.ebuild | 99 | ||||
-rw-r--r-- | flx/initramfs/metadata.xml | 7 | ||||
-rw-r--r-- | flx/lsb/Manifest | 2 | ||||
-rw-r--r-- | flx/lsb/lsb-9999.ebuild | 39 | ||||
-rw-r--r-- | flx/lsb/metadata.xml | 4 | ||||
-rw-r--r-- | flx/preinit/Manifest | 2 | ||||
-rw-r--r-- | flx/preinit/metadata.xml | 4 | ||||
-rw-r--r-- | flx/preinit/preinit-0.ebuild | 34 |
13 files changed, 351 insertions, 0 deletions
diff --git a/eclass/flx-tools.eclass b/eclass/flx-tools.eclass new file mode 100644 index 00000000..db6f99a7 --- /dev/null +++ b/eclass/flx-tools.eclass @@ -0,0 +1,115 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# +# Original Author: root +# Purpose: +# + +HOMEPAGE="http://formilux.org" + +function unpack_plist () +{ + [ $# -ne 2 ] \ + && die "unpack_plist <category> <dst>" + + local cat=$1 + local dst="$2" + + [ ! -d "$dst" ] \ + && mkdir -p "$dst" + + local t + [ -e "$PORTAGE_CONFIGROOT/etc/portage/plist/${cat}/transform" ] \ + && t=( + $(< $PORTAGE_CONFIGROOT/etc/portage/plist/${cat}/transform) + ) + + find "$PORTAGE_CONFIGROOT/etc/portage/plist/${cat}" \ + -mindepth 2 -maxdepth 2 \ + -type f -printf '%P\n' | sort \ + | while read ; do + [ "$(best_version ~$REPLY)" != "$REPLY" ] \ + && ewarn "You should update $PORTAGE_CONFIGROOT/etc/portage/plist/${cat}/$REPLY" + + [ ! -e "$PKGDIR/${REPLY}.tbz2" ] \ + && die "Can't find $PKGDIR/${REPLY}.tbz2" + + einfo "Extracting ${REPLY} ..." + qtbz2 --tarbz2 -O "$PKGDIR/${REPLY}.tbz2" \ + | tar xvpj --atime-preserve --show-transformed-names \ + -C "$dst" \ + -T "$PORTAGE_CONFIGROOT/etc/portage/plist/${cat}/${REPLY}" \ + ${t[@]/#/--transform } \ + | while read ; do + einfo " $REPLY" + done + done +} + +function check_symbol () +{ + [ $# -ne 1 ] \ + && die "chk_dep <fs dir>" + + local dir="$1" + [ ! -d "$dir" ] \ + && die "fs dir $dir does not exist" + + mkdir NEEDED SONAME + einfo "Checking NEEDED and SONAME mismatches ..." + + scanelf -RqBn "$dir" \ + | sed -e "s;$dir/;;" \ + | awk '{ + size=split($1,libs,",") + for (i = 1 ; i <= size ; i++) { + print $2 >> "'NEEDED/'"libs[i] + } + }' + + scanelf -RqBS "$dir" \ + | sed -e "s;dir/;;" \ + | awk '{ + size=split($1,libs,",") + for (i = 1 ; i <= size ; i++) { + print $2 >> "'SONAME/'"libs[i] + } + }' + + diff -Nu \ + <(find SONAME -mindepth 1 \ + -printf '%f\n' \ + | sort) \ + <(find NEEDED -mindepth 1 \ + -printf '%f\n' \ + | sort) \ + | egrep '^(\-|\+)[a-zA-Z0-9]' \ + | while read ; do + case ${REPLY:0:1} in + -) ewarn "${REPLY:1} is needed by nothing" ;; + +) ewarn "${REPLY:1} is missing but needed by :" + cat NEEDED/${REPLY:1} + ;; + esac + done + +# | fgrep -v \ +# -f /etc/portage/crossdev/libdl.lst \ +# -f /etc/portage/crossdev/lib-nosoname.lst \ +} + +function big_compress () +{ + [ $# -ne 1 ] \ + && die "big_compress <dir>" + + find ${1} -type d -name bin -or -name sbin \ + | xargs --no-run-if-empty -I {} -- \ + find {} -type f \ + | xargs --no-run-if-empty -- \ + scanelf -mBF '%F' \ + | xargs --no-run-if-empty -- \ + sstrip -z +} diff --git a/flx/fs/Manifest b/flx/fs/Manifest new file mode 100644 index 00000000..8c0a32b4 --- /dev/null +++ b/flx/fs/Manifest @@ -0,0 +1,2 @@ +EBUILD fs-0.ebuild 473 SHA256 54cb570b109dbc11c2e420467341dbe67496f952752b09170889b5d0f178be55 WHIRLPOOL 5115546f7d1008d5bfac5d0dc6fa379bad8433b2d46d0ee4b715694b4173ba60b735dedf952fcb6ac349ca0340a6ab75c7237b1c78d15ecc739ec77988ace7c0 +MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630 diff --git a/flx/fs/fs-0.ebuild b/flx/fs/fs-0.ebuild new file mode 100644 index 00000000..fcb98e37 --- /dev/null +++ b/flx/fs/fs-0.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit flx-tools + +DESCRIPTION="a dumb one" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack () +{ + mkdir "${S}" + unpack_plist part2 "${S}/fs" +} + +src_compile () +{ + check_symbol "${S}/fs" + + tar czf "${S}/disk.tgz" \ + -C "${S}/fs" \ + . +} + +src_install () +{ + insinto /fs + doins disk.tgz +} diff --git a/flx/fs/metadata.xml b/flx/fs/metadata.xml new file mode 100644 index 00000000..097975e3 --- /dev/null +++ b/flx/fs/metadata.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +</pkgmetadata> diff --git a/flx/initramfs/Manifest b/flx/initramfs/Manifest new file mode 100644 index 00000000..90f2cf1b --- /dev/null +++ b/flx/initramfs/Manifest @@ -0,0 +1,2 @@ +EBUILD initramfs-0.ebuild 2095 SHA256 5f6d11c7a05e3284edfcb35e7af10fdde99828886e728151fe0c5435ba7fe5b3 WHIRLPOOL 6852c3d40310607571f345595b5d5e466ace3c97bb62604624c868d41aae4653f6bdbf16dfb7e399d57ffbddfd53b1364884d1dd6abe8a3242ed019e59ebb9b0 +MISC metadata.xml 212 SHA256 aa0f036698b7c5a290f7f96d404b02291c8334ce8e03138921a1b519fe004d49 WHIRLPOOL 2f9d0dbb799be904c7c33eac5ef93a9045caa1baf72907746415ebe3a4ac163452d120b72e021f965afc3c1d2c8b224331f7a87adf12b7e684bdbc244d9af7b6 diff --git a/flx/initramfs/initramfs-0.ebuild b/flx/initramfs/initramfs-0.ebuild new file mode 100644 index 00000000..4105d433 --- /dev/null +++ b/flx/initramfs/initramfs-0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit flx-tools + +DESCRIPTION="build initramfs" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bzip2 gzip lzma lzo xz" + +DEPEND="app-arch/cpio + bzip2? ( app-arch/bzip2 ) + gzip? ( app-arch/gzip ) + lzma? ( app-arch/lzma ) + lzo? ( app-arch/lzop ) + xz? ( app-arch/xz-utils )" + +DEF_CPIO_FLAGS="--quiet" +DEF_BZIP2_FLAGS="--best" +DEF_GZIP_FLAGS="--best" +DEF_LZMA_FLAGS="--best" +DEF_LZO_FLAGS="--best" +DEF_XZ_FLAGS="--best" + +src_unpack () +{ + mkdir "${S}" + unpack_plist initramfs "${S}/fs" +} + +src_compile () +{ + check_symbol "${S}/fs" + big_compress "${S}/fs" + + einfo "Building initramfs.cpio" + ( + cd fs + find . -print | \ + cpio ${CPIO_FLAGS:-$DEF_CPIO_FLAGS} -o -H newc \ + ) > initramfs.cpio + + if use bzip2 ; then + einfo "Building initramfs.cpio.bz2" + bzip2 -c ${BZIP2_FLAGS:-$DEF_BZIP2_FLAGS} \ + < initramfs.cpio \ + > initramfs.cpio.bz2 \ + || die "Failed to create initramfs.cpio.bz2" + fi + + if use gzip ; then + einfo "Building initramfs.cpio.gzip" + gzip -c ${GZIP_FLAGS:-$DEF_GZIP_FLAGS} \ + < initramfs.cpio \ + > initramfs.cpio.gz \ + || die "Failed to create initramfs.cpio.gz" + fi + + if use lzma ; then + einfo "Building initramfs.cpio.lzma" + lzma -c ${LZMA_FLAGS:-$DEF_LZMA_FLAGS} \ + < initramfs.cpio \ + > initramfs.cpio.lzma \ + || die "Failed to create initramfs.cpio.lzma" + fi + + if use lzo ; then + einfo "Building initramfs.cpio.lzo" + lzop -c ${LZO_FLAGS:-$DEF_LZO_FLAGS} \ + < initramfs.cpio \ + > initramfs.cpio.lzo \ + || die "Failed to create initramfs.cpio.lzo" + fi + + if use xz ; then + einfo "Building initramfs.cpio.xz" + xz -c ${XZ_FLAGS:-$DEF_XZ_FLAGS} \ + < initramfs.cpio \ + > initramfs.cpio.xz \ + || die "Failed to create initramfs.cpio.xz" + fi +} + +src_install () +{ + insinto /fs + + doins initramfs.cpio + + use bzip2 && doins initramfs.cpio.bz2 + use gzip && doins initramfs.cpio.gz + use lzma && doins initramfs.cpio.lzma + use lzo && doins initramfs.cpio.lzo + use xz && doins initramfs.cpio.xz +} diff --git a/flx/initramfs/metadata.xml b/flx/initramfs/metadata.xml new file mode 100644 index 00000000..13f74319 --- /dev/null +++ b/flx/initramfs/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name='xz'>Compress using XZ/LZMA algorithm</flag> + </use> +</pkgmetadata> diff --git a/flx/lsb/Manifest b/flx/lsb/Manifest new file mode 100644 index 00000000..c5dc576b --- /dev/null +++ b/flx/lsb/Manifest @@ -0,0 +1,2 @@ +EBUILD lsb-9999.ebuild 552 SHA256 6c21f219c7752d3723e5455f14929d85dbf4505e00e146efebabb7c535dfe9db WHIRLPOOL 5f96a7a7b67d3828e906a65868894fd7fe7c29f5b7ef650a09f0f470e4182647fbf24f0bfb097dd7400784c70ec36b5c57b98461510e9dd7e31491acfe7834ea +MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630 diff --git a/flx/lsb/lsb-9999.ebuild b/flx/lsb/lsb-9999.ebuild new file mode 100644 index 00000000..06dc22dc --- /dev/null +++ b/flx/lsb/lsb-9999.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +DESCRIPTION="base directory" +HOMEPAGE="http://formilux.org" +SRC_URI="" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack () +{ + mkdir "${S}" +} + +src_install () +{ + dodir /boot + dodir /etc + dodir /flash + dodir /home/admin + dodir /lib/modules + dodir /mnt + dodir /nv + dodir /proc + dodir /root + dodir /sys + dodir /var/{tmp,run,state,lib,spool,log} + + dosym /var/tmp /tmp +} diff --git a/flx/lsb/metadata.xml b/flx/lsb/metadata.xml new file mode 100644 index 00000000..097975e3 --- /dev/null +++ b/flx/lsb/metadata.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +</pkgmetadata> diff --git a/flx/preinit/Manifest b/flx/preinit/Manifest new file mode 100644 index 00000000..01120766 --- /dev/null +++ b/flx/preinit/Manifest @@ -0,0 +1,2 @@ +EBUILD preinit-0.ebuild 490 SHA256 4baa9c75bc2f4eb1d31f2d2864830bd0eacd05652a04fa9c4e2fc7a4e8bf96b3 WHIRLPOOL 33dcc5ee8684faa025a9d6440a85f5574db8a51163780549cec44466fa1bca0d638c31b979859248b9367db9fe5ef5bd3d1b1d3700aaa5521d184a3de33b7618 +MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630 diff --git a/flx/preinit/metadata.xml b/flx/preinit/metadata.xml new file mode 100644 index 00000000..097975e3 --- /dev/null +++ b/flx/preinit/metadata.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +</pkgmetadata> diff --git a/flx/preinit/preinit-0.ebuild b/flx/preinit/preinit-0.ebuild new file mode 100644 index 00000000..54c0720a --- /dev/null +++ b/flx/preinit/preinit-0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit savedconfig + +DESCRIPTION=".preinit file" +HOMEPAGE="http://formilux.org" +LICENSE="public-domain" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack () +{ + mkdir -p "${S}" +} + +src_prepare () +{ + restore_config .preinit + [ ! -e .preinit ] && die "Could not locate user preinit" +} + +src_install () +{ + insinto / + doins .preinit +} |