|
发表于 2011-4-23 07:50:17
|
显示全部楼层
[PHP]
NAME=fcitx
VERSION=4.0.1
ARCH=i686
BUILD=1
CWD=$(pwd)
TMP=/var/tmp/build
PKG=$TMP/package-$NAME
rm -rf $PKG
SLKCFLAGS="-O2 -march=i686 -mtune=native -pipe"
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $NAME-$VERSION
tar xf $CWD/$NAME-$VERSION.tar.?z* || exit 1
cd $NAME-$VERSION || exit 1
chown -R root:root .
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--disable-static \
--disable-tray \
--disable-dbus \
--disable-recording \
--enable-pango
make || exit 1
make install DESTDIR=$PKG || exit 1
find $PKG ! -path "*usr/lib/debug/*" -a ! -path "*usr/src/debug/*" -type f | while read file; do
case "$(file -bi "$file")" in
application/x-sharedlib*|application/x-executable*)
strip --strip-debug --strip-unneeded ${file}
;;
application/x-archive*|application/x-object*)
strip -g ${file}
chmod 644 ${file}
;;
esac
done
mkdir -p $PKG/usr/share/doc/$NAME
install -m 644 -o root -g root \
AUTHORS COPYING ChangeLog THANKS README TODO \
$PKG/usr/share/doc/$NAME
mkdir -p $PKG/etc/profile.d
install -m 755 -o root -g root \
$CWD/profile.d/fcitx.sh \
$PKG/etc/profile.d
cd $PKG
makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.txz
[/PHP]
[PHP]
#Content of $CWD/profile.d/fcitx.sh
XMODIFIERS="@im=fcitx"
XIM=fcitx
XIM_PROGRAM=fcitx
export XMODIFIERS XIM XIM_PROGRAM
[/PHP]
doc 安装在 /usr/share 下,因为我的系统现在是 LFS 的 :-) |
|