today's offers - xanax use in pregnancy xanax xr be abused soma internet pharmacies fedex soma without priscription fed ex phentermine parkinson drugs phentermine baclofen tramadol together ordering tramadol cod viagra find search 76k cialis pages cialis buy on line viagra for sale without a prescription buy onlinecom phentermine viagra ambien and klonopin drug interaction buy ambien overnight cheap online pharmacies valium saturday delivery valium online with no prescription or membership fioricet overnight no rx cheap fioricet without a prescription order meridia cod fedex meridia cheap fed ex delivery xanax bradycardia what does xanax look like american soma how to buy soma online without prescriptin phentermine overnight echeck c o d 375 mg phentermine rss feed cheap no prescription tramadol stop the tramadol generic prices online cialis generic cialis fedex chinese herbal viagra taking partial pill of viagra ambien and pregnancy smoking ambien cod online valium buy cheap valium without prescription no prescription fioricet with fedex fioricet without prescription in Brasilia order meridia meridia information

Posts Tagged ports FreeBSD perl

快快樂樂打造你自已的port

以我自已弄的Net-POP3-SSLWrapper為例

# mkdir /root/Net-POP3-SSLWrapper

# vim Makefile

# New ports collection makefile for:  p5-Net-POP3-SSLWrapper
# Date created:       16 December 2009
# Whom:         johnpupu <johnpupu @gmail.com>
#
# $FreeBSD$
#

PORTNAME= Net-POP3-SSLWrapper
PORTVERSION=  0.02
CATEGORIES= mail perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX=  p5-

MAINTAINER= johnpupu@gmail.com
COMMENT=  Perl extension for simple POP3S wrapper for Net::POP3

BUILD_DEPENDS=  ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL

PERL_CONFIGURE= yes

MAN3= Net::POP3::SSLWrapper.3

.include <bsd .port.mk>

整個Makefile 我是看相同類型的port的Makefile 來參考的

#vim pkg-descr

This is a port of Net-POP3-SSLWrapper.

WWW: http://search.cpan.org/dist/Net-POP3-SSLWrapper/

#fetch http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Net-POP3-SSLWrapper-0.02.tar.gz
#mv Net-POP3-SSLWrapper-0.02.tar.gz /usr/ports/distfiles
#cd /root/Net-POP3-SSLWrapper
#make makesum
這樣/root/Net-POP3-SSLWrapper 目錄裡應該就會有 Makefile, distinfo, pkg-descr 三個檔案
#cd /root/Net-POP3-SSLWrapper
#portlint -a ### 檢查Makefile 有沒有問題
#cp -Rp /root/Net-POP3-SSLWrapper /root/Net-POP3-SSLWrapper.new
#/root/create_pkg.sh /root/Net-POP3-SSLWrapper /root/Net-POP3-SSLWrapper.new
#cp /root/Net-POP3-SSLWrapper.new/pkg-plist /root/Net-POP3-SSLWrapper
這樣 應該就差不多了

然後 寫個測試的perl 看看有沒有問題
我原先的Makefile 是沒寫到BUILD_DEPENDS= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
是看測試的perl 說沒有這個module 才去補上這個dependency

送pr …
#shar `find /root/Net-POP3-SSLWrapper -print` > ~/Net-POP3-SSLWrapper.shar
#send-pr -a ~/Net-POP3-SSLWrapper.shar -c 長輩的e-mail

PS:
1.
create_pkg.sh 請參考

http://blog.wu-boy.com/2009/11/18/1843/

2.

http://www.freebsd.org/doc/zh_TW/books/porters-handbook/plist-autoplist.html

這個自動產生pkg-plist的指令請在bash 底下run
csh 跑不起來..

3.我還沒驗證重作一遍…..不確定過程是完全沒少的

4.
得cls_bsd長輩指點
可以用
ports-mgmt/porttools
來檢查port 對不對
就直接在port 資料夾裡
port test 就會列出是否有錯誤了

5.
Q:
WARN: Makefile: “BUILD_DEPENDS” has to appear earlier.

A:
RUN_DEPENDS和BUILD_DEPENDS
中間不要有空行

6.
要是出現
FATAL: Makefile: duplicated manpage entry Net::POP3::SSLWrapper.3: content of MAN3 will be automatically added to pkg-plist.
表示沒把pkg-plist 中的man文件刪掉
所以請把pkg-plist 中的man 幹掉

手冊寫到
The MAN[1-9LN] variables will automatically add any manpages to pkg-plist (this means you must not list manpages in the pkg-plist——see generating PLIST for more).

ref.

http://www.freebsd.org/doc/zh_TW/books/porters-handbook/index.html

http://blog.wu-boy.com/2009/11/18/1843/

http://blog.wu-boy.com/2009/09/22/1670/

http://www.ptt.cc/man/FreeBSD/DEBD/D160/M.1135705310.A.E5B.html

http://blog.dragon2.net/2009/12/17/912.php

No Comments