This is my old little note about how to build deb package for Debian, it is almost 9 years ago. Just saw it today sitting in my folder, thought still a good stuff to leave it here:
deb package
apt-get install debhelper dh-make dpkg-dev
apt-get install debian-policy devscripts
# create new package
dh_make --createorig
pkg-admin-update --- add dependency file
ref:
http://www.debian-administration.org/articles/286
http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html
http://www.debian.org/doc/devel-manuals#maint-guide
http://users.telenet.be/mydotcom/howto/linux/package02.htm
http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html
http://www.linuxscrew.com/2008/06/11/create-deb-or-rpm-from-targz-with-checkinstall/
alien - convert and install rpm and other packages
autoconf -
# modify changelog
dch -i
# reprepro
mkdir -p /var/www/pkg-debian/conf
cp /var/www/pkg-debian/conf/distributions /var/www/pkg-debian/conf
# add pkg to reprository
reprepro -Vb . include jaunty $i
reprepro --ignore=undefinedtarget -Vb . include jaunty $i
# remove pkg
reprepro -b . remove lenny pkgname
# rename file in a directory
rename:
krb5-config-pkg.debhelper.log
krb5-config-pkg.dirs
krb5-config-pkg.postinst
krb5-config-pkg.postrm
to:
krb5-config-pkgnew.debhelper.log
krb5-config-pkgnew.dirs
krb5-config-pkgnew.postinst
krb5-config-pkgnew.postrm
by cmd:
for i in krb5-config* ; do mv $i ${i/pkg/pkgnew} ; done
rpm packages
rpmbuild -bb pkg-admin-update.spec
rpm -ivh pkg-admin-update.rpm
rpm -qi pkg-admin-update
# on debian
createrepo
apt-rpm-repository
# yum repro
yum-arch
yum-arch /var/www/pkg-centos/5.2/pkg/base
# install SRPM to /usr/src/redhat/
rpm -i rp-pppoe-3.5-32.1.src.rpm
# build SRPM
rpmbuild -ba rp-pppoe.spec
# build RPM
rpmbuild -bb rp-pppoe.spec
#Fedora
http://fedoraproject.org/wiki/Docs/CustomKernel
yum install rpmdevtools yum-utils
rpmdev-setuptree
yumdownloader --source kernel
yum-builddep kernel-<version>.src.rpm
rpm -Uvh kernel-<version>.src.rpm
No comments:
Post a Comment