blob: 141950507b17983e9494416458a88d15f8b28df5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
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>
generate control file
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
generate control file
build opk of new directory
|