From 431e1cb6312dc50522c70e4488857fbcc7635953 Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pjm@nac.net>
Date: Mon, 16 Jan 2012 04:45:16 -0500
Subject: Describe the package build software.

---
diff --git a/package-build-software.txt b/package-build-software.txt
new file mode 100644
index 0000000..ae47f59
--- /dev/null
+++ b/package-build-software.txt
@@ -0,0 +1,47 @@
+buildpkg
+
+sanity checks to make sure $PWD is a source package
+mkdir -p tmp/dest/usr/src/<pkgname>_<pkgver>
+cd tmp
+for file in ../*
+	case $file in
+		../tmp)
+			;;
+		../*)
+			cp -R $file dest/usr/src/<pkgname>_<pkgver>
+build opk of dest: <pkgname>-src_<pkgver>-<pkgrev>_all.opk
+rm -Rf dest
+for binpkgdir in ../*.pkg/
+	check Architecture field in $binpkgdir/control
+	if Architecture == host arch or Architecture == all
+		mkdir dest
+		unpack or copy sources to src
+		binpkg = substring of $binpkgdir without '../' and '.pkg'
+		../build $binpkg
+		for file in *
+			case $file in
+				*.buildstamp)
+					;;
+				*)
+					rm -Rf $file
+					;;
+			esac
+
+
+package 'build' file
+
+makefile
+one target for each binary package
+targets for split binary packages should all be listed in one target rule
+	rule should simply depend on a buildstamp rule
+	buildstamp rule should perform build/install and touch a buildstamp
+example target:
+	cd src
+	configure --prefix=/usr
+	make
+	make DESTDIR=../dest install
+	maybe objcopy debug symbols from binaries
+	strip binaries
+	for each binary package
+		cp or mv files listed in install file from dest to new directory
+		build opk of new directory
--
cgit v0.9.1