|
发表于 2005-3-24 23:15:29
|
显示全部楼层
我觉得可不可以为每一个软件包建一个build文件,比如xpdf-3.00.build。然后用一个脚本去处理它就可以了。不过感觉倒象是gentoo了。呵呵!
- #!/bin/sh
- ./configure --prefix=/usr --sysconfdir=/etc --with-freetype2-includes=/usr/include/freetype2 &&
- make &&
- make install &&
复制代码
简单吧!
不过我倒是有一个简单的包管理脚本。
- #!/bin/bash
- #
- #MPM - Myself Package Manager - v1.0
- #Date: 30-09-2004
- #
- logpath="/src/log"
- #Function that show the options and version of the MPM.
- help()
- {
- echo "MPM: Myself Package Manaer - v1.0"
- echo "-i: make the install-log trace."
- echo "-u: uninstall a package. "
- echo "-s: search the content which what package contained."
- echo "-v: print the package version."
- echo "-h: display this"
- }
- case "$1" in
- -u)
- xargs rm < "$2"
- ;;
- -v)
- ls $logpath | grep $2
- ;;
- -i)
- find $2 -type f -mmin -$3 > "$logpath/$(basename $(pwd))"
- ;;
- -s)
- for i in $logpath/*
- do
- if grep $2 $i
- then
- echo "The Package is $(basename $i)"
- fi
- done
- ;;
- -h)
- help
- ;;
- esac
复制代码
然后再搭配每次make install后都紧接着find <path> -mmin -<time> > /src/log/<packagename>
path: 是指你的package安装的地方,一般都是/usr和/etc/
time: 你可以自由选择,1分钟,2分钟或者多一些!
packagename: 比如xpdf-3.00
这样在我的/src/log/中就有很多记录文件,比如
- harold@fei:harold$ ls /src/log
- Astro-FITS-Headers-2.8.1 glibc-2.3.3-lfs-5.1 pango-1.4.0
- Gtk-Perl-0.7009 gnupg-1.4.0 patch-2.5.4
- Inline-0.44 gpm-1.20.1 pciutils-2.1.11
- PDL-2.4.1 gqview-1.4.3 pcre-4.5
- Parse-RecDescent-1.94 grep-2.5.1 perl-5.8.4
- XML-Parser-2.34 groff-1.19 pkgconfig-0.15.0
- XML-Writer-0.510 grub-0.94 popt-1.7
- Xorg-6.8.1 gsview-4.6 postfix-2.1.1
- a52dec-0.7.4 gtk+-1.2.10 procinfo-18
- apache-2.0.50 gtk+-2.4.4 procmail-3.22
- asclock-1.3 gzip-1.3.5 procps-3.2.1
- atk-1.6.1 hdparm-5.8 proftpd-1.2.10
- audiofile-0.2.6 host prozilla-1.3.6
- autoconf-2.59 hpijs-1.7 psmisc-21.4
- autofs-4.1.3 iana-etc-1.00 python-2.3.4
- automake-1.8.4 icewm-1.2.15pre2 qiv-2.0
- bash-2.05b id3lib-3.8.3 qt-3.3.3
- bash-3.0 imlib-1.9.14 readline-5.0
- bc-1.06 inetutils-1.4.2 rxvt-2.6.4
- bind-utils-9.2.3 jpeg-6b rxvt-unicode-4.0
- binutils-2.14 kasablanca-0.4.0.1 scim-1.0.0
- bison-1.875a kbd-1.12 scim-chinese-0.4.2
- bochs-2.1.1 kftpgrabber-0.5.0-beta1 scim-tables-0.4.0
复制代码
在/src/log/xpdf-3.00中有:
- /usr/bin
- /usr/bin/xpdf
- /usr/bin/pdftops
- /usr/bin/pdftotext
- /usr/bin/pdfinfo
- /usr/bin/pdffonts
- /usr/bin/pdftoppm
- /usr/bin/pdfimages
- /usr/share/man/man1
- /usr/share/man/man1/xpdf.1
- /usr/share/man/man1/pdftops.1
- /usr/share/man/man1/pdftotext.1
- /usr/share/man/man1/pdfinfo.1
- /usr/share/man/man1/pdffonts.1
- /usr/share/man/man1/pdftoppm.1
- /usr/share/man/man1/pdfimages.1
- /usr/share/man/man5
- /usr/share/man/man5/xpdfrc.5
复制代码
要删除包,就需mpm -u xpdf-3.00可以了。 |
|