Faire un paquet .DEB pour Ubuntu/Debian

packages necessaires :

aptitude -R install build-essential devscripts fakeroot debhelper autotools-dev libpcre3-dev libssl-dev zlib1g-dev

recupérer la dernière version (source) du paquet que l’on souhaite débianiser :

wget http://sysoev.ru/nginx/nginx-1.0.4.tar.gz
tar zxvf nginx-1.0.4.tar.gz

apt-get source nginx

apt-get build-dep nginx

cd $(ls -d nginx*/)

export DEBFULLNAME=’nginx-stg’;export DEBEMAIL=’Stephane Chevalier <debian@chevalier.li>’;uupdate –upstream-version 1.0.4 ../nginx-1.0.4.tar.gz

cd ../”$(dpkg-parsechangelog | sed -n ‘s/^Source: //p’)-1.0.4″

sed -i ‘/^Maintainer/s/: .*/: Stephane Chevalier <debian@chevalier.li>/;/^Uploaders/s/: .*/: Stephane Chevalier <debian@chevalier.li>/;/XSBC-Original-Maintainer/d’ debian/control;

sed -i ‘/nginx-upstream-fair.diff/d’ debian/patches/series

grep -A 20 ‘\.\/configure’ debian/rules

sed -i ‘/with-debug/,/nginx-upstream-fair/ c\
\t–with-http_ssl_module \\\
\t–with-http_realip_module \\\
\t–http_limit_req_module \\\
\t–without-mail_pop3_module \\\
\t–without-mail_smtp_module \\\
\t–without-mail_imap_module \\\
\t–without-http_uwsgi_module \\\
\t–without-http_scgi_module \\\
\t–without-http-cache \\\
\t–add-module=../modules/postecho-nginx-module \\
‘ debian/rules

export DEBFULLNAME=’nginx-stg’;export DEBEMAIL=’Stephane Chevalier <debian@chevalier.li>’;dch -i
export DEBFULLNAME=’nginx-stg’;export DEBEMAIL=’debian@chevalier.li’;debuild -i -us -uc

###################

ADD MODULE TO NGINX :

–add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

Leave a Reply

Your email address will not be published. Required fields are marked *