LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: yscong

用slackware的pkgtool管理LFS的包

[复制链接]
 楼主| 发表于 2007-4-27 10:36:34 | 显示全部楼层

unzip的build 欢迎有人能够改进我的脚本

#!/bin/sh
CWD=`pwd`
TMP=/tmp
NAME=unzip
VERSION=5.52
PKG=$TMP/package-$NAME

if [ ! -f $CWD/unzip552.tar.gz ]
then
wget http://downloads.sourceforge.net/infozip/unzip552.tar.gz
fi
if [ ! -f $CWD/$NAME-5.52-security_fix-1.patch ]
then
wget http://www.linuxfromscratch.org/ ... ecurity_fix-1.patch
fi

rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $NAME-$VERSION
tar -xf $CWD/unzip552.tar.gz
cd $NAME-$VERSION

patch -Np1 -i $CWD/unzip-5.52-security_fix-1.patch
make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux
make prefix=$PKG/usr install

bzip2 -9 $PKG/usr/man/man?/*.?

# Strip binaries:
{ cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
}

cd $PKG
makepkg -l y -c n $TMP/$NAME-$VERSION.tgz
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-27 10:58:49 | 显示全部楼层

libtiff 的 build

#!/bin/sh
CWD=`pwd`
TMP=/tmp
NAME=tiff
VERSION=3.8.2
PKG=$TMP/package-$NAME
if [ ! -f $CWD/$NAME-$VERSION.tar.gz ]
then
wget http://libtiff.maptools.org/dl/tiff-3.8.2.tar.gz
fi

rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $NAME-$VERSION
tar -xf $CWD/$NAME-$VERSION.tar.gz
cd $NAME-$VERSION

./configure --prefix=/usr
make
make install DESTDIR=$PKG

# Strip binaries:
{ cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
}

cd $PKG
makepkg -l y -c n $TMP/$NAME-$VERSION.tgz
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表