朝晩はずいぶん冷え込むようになり,
というわけで
PlamoBuildスクリプトの詳細
まず,
1 #!/bin/sh
2 ##############################################################
3 pkgbase="fluxbox"
4 vers="1.3.7"
5 url="https://downloads.sourceforge.net/fluxbox/fluxbox-1.3.7.tar.xz"
6 arch=`uname -m`
7 build=B1
8 src="fluxbox-1.3.7"
9 OPT_CONFIG="--disable-static --enable-shared"
10 DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
11 patchfiles=""
12 compress=txz
13 ##############################################################
14
15 source /usr/share/plamobuild_functions.sh
16
17 # このスクリプトで使う1文字変数の意味
18 #
19 # $W : このスクリプトを動かすカレントディレクトリ
20 # $S : ソースコードのあるディレクトリ(デフォルト: $W/${src})
21 # $B : ビルド用ディレクトリ(デフォルト: /tmp/build)
22 # $P : ビルドしたファイルをインストールするディレクトリ(デフォルト: $W/work)
23
24 if [ $# -eq 0 ] ; then
25 opt_download=0 ; opt_config=1 ; opt_build=1 ; opt_package=1
26 else
27 opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0
28 for i in $@ ; do
29 case $i in
30 download) opt_download=1 ;;
31 config) opt_config=1 ;;
32 build) opt_build=1 ;;
33 package) opt_package=1 ;;
34 esac
35 done
36 fi
37 if [ $opt_download -eq 1 ] ; then
38 download_sources
39 fi
40
41 if [ $opt_config -eq 1 ] ; then
42 ######################################################################
43 # out of tree build. patch apply in src dir
44 ######################################################################
45 if [ -d $B ] ; then rm -rf $B ; fi ; mkdir -p $B
46 cd $S
47 for patch in $patchfiles ; do
48 if [ ! -f .${patch} ]; then
49 patch -p1 < $W/$patch
50 touch .${patch}
51 fi
52 done
53 # if [ -f autogen.sh ] ; then
54 # sh ./autogen.sh
55 # fi
56 cd $B
57 export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig
58 export LDFLAGS='-Wl,--as-needed'
59 $S/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir='${prefix}'/share/man ${OPT_CONFIG}
60 if [ $? != 0 ]; then
61 echo "configure error. $0 script stop"
62 exit 255
63 fi
64 fi
65
66 if [ $opt_build -eq 1 ] ; then
67 cd $B
68 export LDFLAGS='-Wl,--as-needed'
69 make -j3
70 if [ $? != 0 ]; then
71 echo "build error. $0 script stop"
72 exit 255
73 fi
74 fi
75
76 if [ $opt_package -eq 1 ] ; then
77 check_root
78 if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P
79 cd $B
80
81 export LDFLAGS='-Wl,--as-needed'
82 make install DESTDIR=$P
83
84 ################################
85 # install tweaks
86 # strip binaries, delete locale except ja, compress man,
87 # install docs and patches, compress them and chown root.root
88 ################################
89 install_tweak
90
91 #############################
92 # convert symlink to null file and
93 # add "ln -sf" command into install/doinst.sh
94 ################################
95 convert_links
96
97 cd $P
98 /sbin/makepkg ../$pkg.$compress <<EOF
99 y
100 1
101 EOF
102
103 fi
ご覧の通り,
それぞれの作業を行うかどうかは$opt_
15行目で読みこんでいる/usr/
また,
PlamoBuildスクリプトの再実行
さて,
設定処理
前回,
9 OPT_CONFIG=""
ここで指定していた"--disable-static --enable-shared"という指定は,
OPT_
$ ./PlamoBuild.fluxbox-1.3.7 config checking for gcc... gcc checking whether the C compiler works... yes ... fluxbox version 1.3.7 configured successfully. Using: '/usr' for installation. '/usr/share/fluxbox/menu' for location menu file. '/usr/share/fluxbox/windowmenu' for location window menu file. '/usr/share/fluxbox/styles/bloe' by default style. '/usr/share/fluxbox/keys' for location keys file. '/usr/share/fluxbox/init' for location init file. '/usr/share/fluxbox/nls' for nls files. 'g++' for C++ compiler. Building with: '-I/usr/include/fribidi -g -O2 ' for C++ compiler flags. ' -lfontconfig -lfreetype -lfreetype -lfribidi -lImlib2 -lXrandr -lXext -lXft -lXinerama -lXpm -lX11 -lXrender -lX11' for linker flags. Now build fluxbox with 'make'
configを引数に指定してPlamoBuildスクリプトを実行すると,
$ ls /tmp/build/ Makefile config.h config.log config.status* nls/ src/ stamp-h1 util/ version.h