小脚本:自动下载并编译安装XFce4 RC3
自己编译XFce4时用的,看到lovewilliam放出了rpm包,所以索性把自己写的这个脚本帖上来,希望对那些想要自己编译的朋友有点帮助。需要两个文件:
dirlist -- 保存了一些目录信息
xfce4_install.sh -- 脚本文件,执行它就可以自动编译安装XFce4 RC3
贴一下这两个文件,附件是这两个文件的打包,tar.bz2文件,将txt后缀去掉即可。
File : dirlist
xfcalendar-4.1.99.3
xfce4-appfinder-4.1.99.3
xfce4-iconbox-4.1.99.3
xfce4-icon-theme-4.1.99.3
xfce4-mixer-4.1.99.3
xfce4-panel-4.1.99.3
xfce4-session-4.1.99.3
xfce4-systray-4.1.99.3
xfce4-toys-4.1.99.3
xfce4-trigger-launcher-4.1.99.3
xfce-mcs-manager-4.1.99.3
xfce-mcs-plugins-4.1.99.3
xfce-utils-4.1.99.3
xfdesktop-4.1.99.3
xffm-4.1.99.3
xfprint-4.1.99.3
xfwm4-4.1.99.3
xfwm4-themes-4.1.99.3
xfce4_install.sh:
#!/bin/bash
# Purpose : Install XFce4-4.1.99.3 on Magic Linux from source packages.
# Author : [email protected] - Just a Magic Linux Fan ^_^.
# Date : 2005/01/08.
# In the top directory of each module,in the following build order:
# libxfce4util
# libxfcegui4
# libxfce4mcs
# xfce-mcs-manager
# all other modules
export ROOTDIR=$(pwd)/xfce-4.1.99.3/src
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
function pkg_download(){
# Download the source packages.
# For more download sites,please check here:
# http://www.xfce.org/index.php?page=download&lang=zh
pkg_url="http://www.us.xfce.org/archive/xfce-4.1.99.3/fat_tarballs/xfce-4.1.99.3-src.tar.bz2"
if [ -f $(basename $pkg_url) ]
then
echo -e "\n\t\033[36m Source packages have been downloaded.\033[0m"
echo -e "\t\033[36m Script will build them now .\033[0m"
echo -e "\t\033[36m Please waiting ...\033[0m"
else
proz -r -k=4 $pkg_url
fi
}
function pkg_extract(){
# Extract all packages.
function print_msg(){
echo -e "\t\033[36m Extracting package $(basename $PKG) ... \033[0m"
}
echo -e "\t\033[36m Extracting package xfce-4.1.99.3-src.tar.bz2 ...\033[0m"
tar xjf xfce-4.1.99.3-src.tar.bz2&& \
for PKG in $(ls ./xfce-4.1.99.3/src/*.tar.*)
do
case $PKG in
*.tar.gz)
print_msg&&tar zxf $PKG -C $ROOTDIR
;;
*.tar.bz2)
print_msg&&tar xjf $PKG -C $ROOTDIR
;;
*) .;;
esac
done
}
function mod_install(){
# Install XFce4 module packages.
mod_pkgs_list=(dbh-1.0.20 libxfce4util-4.1.99.3 libxfcegui4-4.1.99.3 libxfce4mcs-4.1.99.3 xfce-mcs-manager-4.1.99.3)
# build and install these module packages.
for mod_pkg in ${mod_pkgs_list[*]}
do
#cd $ROOTDIR/$mod_pkg&&pwd&& \
cd $ROOTDIR/$mod_pkg&&./configure&&make&&make install&& \
echo -e "\n\t\033[36m Module $mod_pkg has been installed !\033[0m\n"
done
}
function pkginstall()
{
# Install all packages.
for pkg_dir in $(cat DIRLIST)
do
#cd $ROOTDIR/$pkg_dir&&pwd&& \
cd $ROOTDIR/$pkg_dir&&./configure&&make&&make install&& \
echo -e "\n\t Package $pkg_dir has been installed !\n"
done
}
pkg_download&& \
pkg_extract&& \
mod_install&& \
pkginstall&& \
echo -e "\n\t\t\033[36m Successful !\033[0m\n"
我的脚本很烂的 其实rpm支持在线安装的:
# rpm -ih http://www.****/xxx.rpm
所以你的那个脚本可以用一个循环来搞定
页:
[1]