pkgsrc tips
1.cpuflags
devel/cpuflags:Determine compiler flags to best target current cpu
#cd /usr/pkgsrc/devel/cpuflags
#make install
然后在/etc/mk.conf中加入:
.sinclude "/usr/pkg/share/mk/cpuflags.mk"
.sinclude "/usr/pkg/share/mk/optimize_gcc.mk"
这样make时便能够根据cpuflags进行优化编译了。
2.pkgclean
pkgtools/pkgclean:Quickly clean up all work directories in pkgsrc
#cd /usr/pkgsrc/pkgtools/pkgclean
#make install
运行pkgclean快速清除所有work
3.FETCH_CMD
在/etc/mk.conf中加入: FETCH_CMD=/usr/pkg/bin/wget -cT 20
使用wget来下载源码包。 -c 为断点续传,T 20为20秒没响应则断开重连。
4.pkg_tarup
pkgtools/pkg_tarup:Generates binary package(s) from installed pkg(s)
#cd /usr/pkgsrc/pkgtools/pkg_tarup
#make install
运行pkg_tarup pkg_name
将生成pkg_name
的相应二进制包。
运行pkg_tarup_all
将把所有通过pkgsrc安装的软件都生成二进制包。
待续…