On 05/03/10 18:31, Ken Moffat wrote:
[putolin]
> For the things you can do better, feel free to laugh at my feeble
> efforts. For the rest, use anything that is useful to you. Share and
> enjoy!
>
> ĸen
Ken here is how I build/complete my system after I do LFSx.x
Maybe you will see something you could use?
I have a directory layout like this
Build.pacman
+---fakeroot
+---libfetch
+---pacman
+---libarchive
+---libarchive-2.7.1.tar.gz
+---Makefile
I then have a Makefile in the Build.pacman directory like this that
calls/runs other Makefiles in the package specific directory(s)
SUBDIRS = fakeroot libarchive libfetch pacman
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
libarchive:
libfetch: libarchive
pacman: libarchive libfetch
fakeroot: pacman
The package specific directory contains the source tarball and patch(s)
as well as another Makefile like this for example this is the Makefile
for libarchive
cwd=$(shell pwd)
pkgname := libarchive
pkgver := 2.7.1
srcname := $(pkgname)-$(pkgver).tar.gz
pkgdir := $(cwd)/pkg
srcdir := $(cwd)/$(pkgname)-$(pkgver)
$(pkgname).is.installed:
tar xvf $(srcname)
mkdir -vp $(pkgdir)
cd $(srcdir); ./configure --prefix=/usr || exit 1
cd $(srcdir); make || exit 1
cd $(srcdir); make DESTDIR=$(pkgdir) install || exit 1
rm -rf $(pkgdir)/usr/share || exit 1
sudo chown root:root -R $(pkgdir)
sudo rsync -var $(pkgdir)/ /
sudo rm -rf $(srcdir) $(pkgdir)
touch $(pkgname).is.installed
One could omit the make DESTDIR=$(pkgdir) install || exit 1
line and some those following it, if one wants to install directly to
the filesystem. What the install to $(pkgdir) gives me is if I need to
modify anything in the package like moving man dirs, rm some things or
add config files I do it and then place the package into the root
filesystem. In the above example I whack the man/docs files as I don't
need them.
Thanks for your scripts I will have a look at them.
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page