diff options
author | dancer <dancer> | 2001-08-23 14:45:57 +0000 |
---|---|---|
committer | dancer <dancer> | 2001-08-23 14:45:57 +0000 |
commit | aa0f8a0119c4f6849609b8566b95de786e215c57 (patch) | |
tree | 6ff1a8fa52c12c004bc7a979f07dcae14b9a897d | |
download | pbuilder-aa0f8a0119c4f6849609b8566b95de786e215c57.tar pbuilder-aa0f8a0119c4f6849609b8566b95de786e215c57.tar.gz |
Initial revision
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README | 7 | ||||
-rwxr-xr-x | build-package | 4 | ||||
-rwxr-xr-x | build-package.sh | 56 | ||||
-rw-r--r-- | debian/README.Debian | 7 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/control | 12 | ||||
-rw-r--r-- | debian/copyright | 10 | ||||
-rw-r--r-- | debian/dirs | 2 | ||||
-rw-r--r-- | debian/docs | 1 | ||||
-rwxr-xr-x | debian/rules | 80 | ||||
-rwxr-xr-x | pbuilder-buildpackage.sh | 23 | ||||
-rwxr-xr-x | pbuilder-createbuildenv | 47 | ||||
-rwxr-xr-x | pbuilder-updatebuildenv | 45 | ||||
-rwxr-xr-x | pbuilderrc | 8 |
15 files changed, 322 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e0c94b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +clean: + + +install: + install -d $(DESTDIR)/etc + install -d $(DESTDIR)/usr/sbin + install -m 755 pbuilder-buildpackage.sh $(DESTDIR)/usr/sbin + install -m 755 pbuilder-createbuildenv $(DESTDIR)/usr/sbin + install -m 755 pbuilder-updatebuildenv $(DESTDIR)/usr/sbin + install -m 644 pbuilderrc $(DESTDIR)/etc + @@ -0,0 +1,7 @@ +run build-package. +give a packagename to build. + +It should work quite easily. + +base.tgz is required initially. + diff --git a/build-package b/build-package new file mode 100755 index 0000000..8511f98 --- /dev/null +++ b/build-package @@ -0,0 +1,4 @@ +#!/bin/sh + +for a in $@; do ./build-package.sh $a; done + diff --git a/build-package.sh b/build-package.sh new file mode 100755 index 0000000..f28e0db --- /dev/null +++ b/build-package.sh @@ -0,0 +1,56 @@ +#!/bin/bash +export LANG=C +export LC_ALL=C + +PACKAGENAME=$1 +BASETGZ=/tmp/base.tgz +MYREPOSITORY=/home/dancer/DEBIAN/personal-buildd/build-package/my-repos +MYREPOSITORYEXTRAPATH=$MYREPOSITORY/i386/athlon +MYREPOSITORYHTTP=http://atoron.work.isl.doshisha.ac.jp/athlonmirror +EXTRAPACKAGES=gcc3.0-athlon-builder +export DEBIAN_BUILDARCH=athlon +BUILDPLACE=/home/dancer/buildd/tmp/buildd +CHROOTEXEC="chroot $BUILDPLACE " + + + +cd $MYREPOSITORY +echo Initializing repository +dpkg-scanpackages . . | gzip > Packages.gz +dpkg-scansources . . | gzip > Sources.gz + + +echo cleaning the build env +rm -rf $BUILDPLACE + +echo building the build env +mkdir -p $BUILDPLACE +cd $BUILDPLACE +tar xfzp $BASETGZ +mkdir -p $BUILDPLACE/tmp/buildd +for a in passwd hosts hostname resolv.conf; do + cp /etc/$a $BUILDPLACE/etc/$a; +done + +echo Installing apt-lines +cat > $BUILDPLACE/etc/apt/sources.list << EOF +deb $MYREPOSITORYHTTP ./ +deb-src $MYREPOSITORYHTTP ./ +deb http://www.jp.debian.org/debian unstable main contrib non-free +deb-src http://www.jp.debian.org/debian unstable main contrib non-free +EOF + +echo Refreshing the base.tgz +$CHROOTEXEC /usr/bin/apt-get update +$CHROOTEXEC /usr/bin/dpkg --purge lilo +$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade +$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES +$CHROOTEXEC /usr/bin/apt-get clean +cd $BUILDPLACE +#tar cfz $BASETGZ * + +echo Installing the build-deps and building +$CHROOTEXEC /bin/sh -c "(cd tmp/buildd; apt-get -y build-dep $PACKAGENAME ; apt-get -y source --build $PACKAGENAME || rm /tmp/buildd/* )" +echo Installing $BUILDPLACE/tmp/buildd/* to archive +mkdir -p $MYREPOSITORYEXTRAPATH +cp $BUILDPLACE/tmp/buildd/* $MYREPOSITORYEXTRAPATH diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..553ffa1 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,7 @@ +pbuilder for Debian +------------------------ + +This is a personal builder. + + + -- Junichi Uekawa <dancer@debian.org>, Sat, 28 Jul 2001 17:05:50 +0900 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..424499c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +pbuilder (0.1) unstable; urgency=low + + * Initial Release. + + -- Junichi Uekawa <dancer@debian.org> Sat, 28 Jul 2001 17:29:08 +0900 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ace616e --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: pbuilder +Section: unknown +Priority: optional +Maintainer: Junichi Uekawa <dancer@debian.org> +Build-Depends: debhelper (>> 3.0.0) +Standards-Version: 3.5.2 + +Package: pbuilder +Architecture: any +Depends: ${shlibs:Depends} +Description: <insert up to 60 chars description> + <insert long description, indented with spaces> diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..23a4b47 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Junichi Uekawa <dancer@debian.org> on +Sat, 28 Jul 2001 17:05:50 +0900. + +It was downloaded from <fill in ftp site> + +Upstream Author(s): <put author(s) name and email here> + +Copyright: + +<Must follow here> diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b557758 --- /dev/null +++ b/debian/rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/build-package. + $(MAKE) install DESTDIR=$(CURDIR)/debian/pbuilder + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/pbuilder-buildpackage.sh b/pbuilder-buildpackage.sh new file mode 100755 index 0000000..13117ed --- /dev/null +++ b/pbuilder-buildpackage.sh @@ -0,0 +1,23 @@ +#!/bin/bash +export LANG=C +export LC_ALL=C + +PACKAGENAME=$1 +. /etc/pbuilderrc +CHROOTEXEC="chroot $BUILDPLACE " + +echo cleaning the build env +rm -rf $BUILDPLACE + +echo building the build env +mkdir -p $BUILDPLACE +cd $BUILDPLACE +tar xfzp $BASETGZ +mkdir -p $BUILDPLACE/tmp/buildd + +echo Installing the build-deps and building +$CHROOTEXEC /bin/sh -c "(cd tmp/buildd; apt-get -y build-dep $PACKAGENAME ; apt-get -y source --build $PACKAGENAME || rm /tmp/buildd/* )" +echo Installing $BUILDPLACE/tmp/buildd/* to archive +mkdir -p $MYREPOSITORYEXTRAPATH +cp $BUILDPLACE/tmp/buildd/* $MYREPOSITORYEXTRAPATH + diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv new file mode 100755 index 0000000..bc5d560 --- /dev/null +++ b/pbuilder-createbuildenv @@ -0,0 +1,47 @@ +#!/bin/bash +#necessary for installs. +export LANG=C +export LC_ALL=C + +DISTRIBUTION=$1 +. /etc/pbuilderrc +CHROOTEXEC="chroot $BUILDPLACE " +if [ -z "$DISTRIBUTION" ]; then + DISTRIBUTION=woody +fi +echo Distribution is $DISTRIBUTION. + +cd $MYREPOSITORY +echo Initializing repository +dpkg-scanpackages . . | gzip > Packages.gz +dpkg-scansources . . | gzip > Sources.gz + +echo cleaning the build env +rm -rf $BUILDPLACE + +echo building the build env +mkdir -p $BUILDPLACE +cd $BUILDPLACE +debootstrap $DISTRIBUTION . +mkdir -p $BUILDPLACE/tmp/buildd +for a in passwd hosts hostname resolv.conf apt; do + cp -r /etc/$a $BUILDPLACE/etc/; +done + +echo Installing apt-lines +cat > $BUILDPLACE/etc/apt/sources.list << EOF +deb $MYREPOSITORYHTTP ./ +deb-src $MYREPOSITORYHTTP ./ +deb http://www.jp.debian.org/debian $DISTRIBUTION main contrib non-free +deb-src http://www.jp.debian.org/debian $DISTRIBUTION main contrib non-free +EOF + +echo Refreshing the base.tgz +$CHROOTEXEC /usr/bin/apt-get update +$CHROOTEXEC /usr/bin/dpkg --purge lilo +$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade +$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES +$CHROOTEXEC /usr/bin/apt-get clean +cd $BUILDPLACE +tar cfz $BASETGZ * + diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv new file mode 100755 index 0000000..6b347de --- /dev/null +++ b/pbuilder-updatebuildenv @@ -0,0 +1,45 @@ +#!/bin/bash +export LANG=C +export LC_ALL=C + +PACKAGENAME=$1 + +. /etc/pbuilderrc + +CHROOTEXEC="chroot $BUILDPLACE " + +cd $MYREPOSITORY +echo Initializing repository +dpkg-scanpackages . . | gzip > Packages.gz +dpkg-scansources . . | gzip > Sources.gz + +echo cleaning the build env +rm -rf $BUILDPLACE + +echo building the build env +mkdir -p $BUILDPLACE +cd $BUILDPLACE +tar xfzp $BASETGZ +mkdir -p $BUILDPLACE/tmp/buildd +for a in passwd hosts hostname resolv.conf; do + cp /etc/$a $BUILDPLACE/etc/$a; +done + +echo Installing apt-lines +cat > $BUILDPLACE/etc/apt/sources.list << EOF +deb $MYREPOSITORYHTTP ./ +deb-src $MYREPOSITORYHTTP ./ +deb http://www.jp.debian.org/debian unstable main contrib non-free +deb-src http://www.jp.debian.org/debian unstable main contrib non-free +EOF + +echo Refreshing the base.tgz +$CHROOTEXEC /usr/bin/apt-get update +$CHROOTEXEC /usr/bin/dpkg --purge lilo +$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade +$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES +$CHROOTEXEC /usr/bin/apt-get clean +cd $BUILDPLACE +echo Creating base.tgz +tar cfz $BASETGZ * + diff --git a/pbuilderrc b/pbuilderrc new file mode 100755 index 0000000..a1fa8b4 --- /dev/null +++ b/pbuilderrc @@ -0,0 +1,8 @@ +BASETGZ=/tmp/base.tgz +MYREPOSITORY=/home/dancer/DEBIAN/personal-buildd/my-repos +MYREPOSITORYEXTRAPATH=$MYREPOSITORY/i386/athlon +MYREPOSITORYHTTP=http://atoron.work.isl.doshisha.ac.jp/athlonmirror +#EXTRAPACKAGES=gcc3.0-athlon-builder +#export DEBIAN_BUILDARCH=athlon +BUILDPLACE=/home/dancer/buildd/tmp/buildd + |