Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1853990
  • 博文数量: 237
  • 博客积分: 9995
  • 博客等级: 中将
  • 技术积分: 2890
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-30 10:33
文章分类

全部博文(237)

文章存档

2011年(1)

2007年(59)

2006年(177)

我的朋友

分类: BSD

2006-06-23 10:27:29

还有其他方法.

 

-----------------有用的工具---------------------------

1,pkgfind 查找软件

#cd /usr/pkgsrc/pkgtools/pkgfind

#make install clean-depends

 

netbsd: {10} pkgfind xorg

fonts/xorg-fonts100dpi: X.org 100dpi bitmap fonts

fonts/xorg-fonts75dpi: X.org 75dpi bitmap fonts

fonts/xorg-fontsCyrillic: X.org Cyrillic bitmap fonts

fonts/xorg-fontsEncodings: X.org Encoding fonts

fonts/xorg-fontsMisc: X.org miscellaneous bitmap fonts

fonts/xorg-fontsTruetype: X.org Truetype fonts

fonts/xorg-fontsType1: X.org Type1 fonts

fonts/xorg-fontserver: X.org font server

meta-pkgs/xorg: X.org meta-package

misc/xorg-docs: X.org Documentation

x11/xorg-clients: X.org client programs and related files

x11/xorg-imake: Imake and other utilities from X.org

x11/xorg-libs: X.org Libraries

x11/xorg-server: X.org X server and related programs

 

2,pkglint

#pkgfind pkglint

#cd /usr/pkgsrc/pkgtools/pkglint

#make install clean-depends

 

用法:lintpkgsrc -i 检查是否有更新的版本 man lingpkgsrc

netbsd:lintpkgsrc -i

Scanning Makefiles: 4866 packages

Unknown package: 'Xrandr' version 1.0.2

 

3, cpuflags

优化编译

/etc/mk.conf控制编译的一些状态.cpuflags 根据用户的环境自动优化.

#pkgfind cpu

netbsd: {18} pkgfind cpu

devel/cpuflags: Determine compiler flags to best target current cpu

print/gimp-print-escputil: Epson Stylus inkjet printer tool

sysutils/cpuburn: CPU load testing utilities for Pentium pro and later

sysutils/cpuid: CPU identification feature

sysutils/wmcpuload: Dockable CPU monitor

sysutils/xfce4-cpugraph-plugin: XFce4 CPU load plugin

 

#cd /usr/pkgsrc/devel/cpuflags

#make install clean-depends

然后加入下面到/etc/mk.conf

#touch /etc/mk.conf

.sinclude "/usr/pkg/share/mk/cpuflags.mk"

.sinclude "/usr/pkg/share/mk/optimize_gcc.mk"

4pkgclean

快速清除work

cd /urs/pkgsrc/pkgtools/pkgclean

make install clean-depends

用法:

pkgclean

 

还有很多有用的工具,自己体会吧。我的mk.conf

netbsd: {19} more /etc/mk.conf

.sinclude "/usr/pkg/share/mk/cpuflags.mk"

.sinclude "/usr/pkg/share/mk/optimize_gcc.mk"

FETCH_CMD= /usr/pkg/bin/wget -cT 20

#--------------for master_site_backup------------------

MASTER_SITE_BACKUP?= \

ftp://ring.asahi-net.or.jp/pub/NetBS...es/distfiles/\

ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/\

ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/

MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}

#--------------for master_site_backup------------------

#MKX11=yes

ACCEPTABLE_LICENSES+=no-commercial-use

ACCEPTABLE_LICENSES+=unrar-license

ACCEPTABLE_LICENSES+=citrix_ica-license

 

特别说的是我用wget 替代了系统自己的ftp,来下载distfiles

------------------------软件的更新-----------------------

如果lintpkgsrc发现有更新的版本。

那么可能需要更新,这个看你自己是否喜欢追新了。

1make update

这个方法是更新软件并更新所有依赖这个软件的软件。所以不建议经常使用。

2make replace

这个方法只是更新本软件。

不建议使用make deinstall make reinstall

-------------------------软件的删除----------------------

pkg_delete -vd xxx

删除本软件

pkg_delete -vdr 删除本软件和依赖本软件的软件,小心使用。

-------------------------软件的信息管理--------------------

pkg_info

列出已经安装的软件

pkg_info -dL xx

列出xx软件的介绍信息和安装的所有相关文件.

netbsd: {42} pkg_info -dL wget

Information for wget-1.9.1nb1:

 

Description:

Wget [formerly known as Geturl] is a freely available network utility

to retrieve files from the World Wide Web using HTTP and FTP, the two

most widely used Internet protocols. It works non-interactively, thus

enabling work in the background, after having logged off.

 

The recursive retrieval of HTML pages, as well as FTP sites is

supported -- you can use Wget to make mirrors of archives and home

pages, or traverse the web like a WWW robot (Wget understands

/robots.txt).

 

Homepage:

 

Files:

/usr/pkg/info/wget.info

/usr/pkg/info/wget.info-1

/usr/pkg/info/wget.info-2

/usr/pkg/info/wget.info-3

/usr/pkg/info/wget.info-4

/usr/pkg/bin/wget

/usr/pkg/man/man1/wget.1

/usr/pkg/share/locale/bg/LC_MESSAGES/wget.mo

/usr/pkg/share/locale/ca/LC_MESSAGES/wget.mo

/usr/pkg/share/locale/cs/LC_MESSAGES/wget.mo

/usr/pkg/share/locale/da/LC_MESSAGES/wget.mo

/usr/pkg/share/locale/de/LC_MESSAGES/wget.mo

/usr/pkg/share/locale/el/LC_MESSAGES/wget.mo ......

查找

pkg_info|grep xx

依赖关系

pkg_info -R xx

------------------------------------------------------------------------

另外netbsd 将一些依赖关系特强的集中在一起,这个就是meta-pkgs

 

netbsd: {43} cd /usr/pkgsrc/meta-pkgs

netbsd: {44} ls

CVS gnome gnustep web-server

Makefile gnome-accessibility gtk2-extras windowmaker-desktop

README.html gnome-base kde3 xfce4

XFree86 gnome-devel netbsd-doc xfce4-extras

edesktop gnome-extras netbsd-doc-print xorg

fxtv-capture gnome1 netbsd-www

============================================================

这些软件主要是x系统如xfree86,xorg

桌面环境gnome kde等。

 

 

 

阅读(1699) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~