source: hybrid/branches/releng-11/nanobsd/tools/package-build.sh@ 13658

Last change on this file since 13658 was 13657, checked in by rick, 8 years ago

Starting to migrate tree to 11_0 branch

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/sh
2#
3# Compile listing of required packages using poudriere and friends
4#
5# Rick van der Zwet <rick@wirelessleiden.nl>
6#
7
8. `dirname $0`/common.inc.sh
9
10cfg_dir=`dirname $0`/../cfg
11poudriere_pkglist_file=${cfg_dir}/wlpkgbuild11_0-default-node-pkglist
12
13
14packages_initenv() {
15 config_dir=`dirname $0`
16
17 # Install required deamons
18 pkg install poudriere dialog4ports portshaker
19
20 # Setup poudriere build environment
21 poudriere jail -c -j wlpkgbuild11_0 -v 11.0-RELEASE -a i386
22
23 # Setup portshaker
24 cp ${config_dir}/portshaker.conf /usr/local/etc/
25 cp ${config_dir}/portshaker.d/* /usr/local/etc/portshaker.d
26
27 # Update ports
28 portshaker -U
29 portshaker -M
30
31 # Setup poudriere ports environment
32 poudriere ports -c -F -f none -p default -M /usr/local/poudriere/ports/default
33
34 # Build options
35 poudriere options -j wlpkgbuild11_0 -p default -z node -f ${poudriere_pkglist_file}
36}
37
38packages_refresh() {
39 # Install new package options
40 POUDRIERE_MAKE_CONF_FILE=wlpkgbuild11_0-node-make.conf
41 POUDRIERE_OPTIONS=wlpkgbuild11_0-node-options
42
43 if [ -d "/usr/local/etc/poudriere.d/$POUDRIERE_OPTIONS" ]; then
44 rm -Rf /usr/local/etc/poudriere.d/$POUDRIERE_OPTIONS
45 fi
46
47 cp ${cfg_dir}/$POUDRIERE_MAKE_CONF_FILE /usr/local/etc/poudriere.d
48 cp -R ${cfg_dir}/$POUDRIERE_OPTIONS /usr/local/etc/poudriere.d
49}
50
51
52packages_build() {
53 poudriere bulk -j wlpkgbuild11_0 -p default -z node -f ${poudriere_pkglist_file}
54}
55
56# Make package list
57. $cfg_dir/nanobsd.wleiden
58echo $PACKAGE_LIST | tr " " "\n" > ${poudriere_pkglist_file}
59
60
61if [ "x$1" = "xinitenv" ]; then
62 packages_initenv
63 packages_refresh
64elif [ "x$1" = "xrebuild" ]; then
65 packages_refresh
66 packages_build
67elif [ "x$1" = "xbuild" ]; then
68 packages_build
69else
70 echo "Usage $0 <initenv|rebuild|build>"
71 exit 128
72fi
Note: See TracBrowser for help on using the repository browser.