Ini adalah dokumen versi lama!
Halaman ini berisi informasi dari awal sampai akhir bagaimana membangun paket fortunes-kernelnewbies secara bersih dengan pbuilder dan alat-alat standar di sistem Debian.
apt-get update
mkdir fortunes-kernelnewbies-20060120
cd fortunes-kernelnewbies-20060120/ tar zxvf ../kernelnewbies-fortunes.tar.gz
dh_make -s -c bsd -f ../kernelnewbies-fortunes.tar.gz
Direktori debian/ akan berisi berkas-berkas yang dibutuhkan untuk memaketkan program
$ cd debian/ $ rm *.ex *.EX dirs docs README.Debian
Source: fortunes-kernelnewbies Section: games Priority: optional Maintainer: Iwan Setiawan <stwn[@]kuliax[.]org> Build-Depends: cdbs, debhelper (>= 7) Build-Depends-Indep: fortune-mod Standards-Version: 3.8.0 Homepage: http://old.kernelnewbies.org Package: fortunes-kernelnewbies Architecture: all Depends: fortune-mod Provides: fortune-cookie-db Description: Linux kernel hackers' quotes for fortune An official syndicated #kernelnewbies fortunes file that contained quotes from Linux kernel hackers on LKML and kernelnewbies community on IRC channel #kernelnewbies at irc.oftc.net.
debian/copyright:
This package was debianized by Iwan Setiawan <stwn[@]kuliax[.]org> on Sun, 31 Jan 2010 23:58:32 +0700. It was downloaded from http://old.kernelnewbies.org/kernelnewbies-fortunes.tar.gz Upstream Author: KernelNewbies.org <kernelnewbies@nl.linux.org> Copyright: Copyright (C) 2006 Linux Kernel Hackers and KernelNewbies.org Community License: I am not sure about the license, since upstream package does not have any README or license file except the fortunes database. So I follow many RPM packages which stated that it is under BSD. Redistribution and use in source and binary forms, with or without modification, are permitted under the terms of the BSD License. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. On Debian systems, the complete text of the BSD License can be found in `/usr/share/common-licenses/BSD'. The Debian packaging is (C) 2010, Iwan Setiawan <stwn[@]kuliax[.]org> and is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
dirs:
usr/share/games/fortunes
install
kernelnewbies* usr/share/games/fortunes
debian/postinst:
#!/bin/sh case "$1" in configure) cp /etc/profile /etc/profile.orig echo "Adding fortune kernelnewbies to /etc/profile..." echo 'echo ""' >> /etc/profile echo "fortune kernelnewbies" >> /etc/profile echo 'echo""' >> /etc/profile ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0
debian/postrm
#!/bin/sh case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) echo "Removing fortune kernelnewbies from /etc/profile..." sed -i '/echo ""/d' /etc/profile sed -i '/fortune kernelnewbies/d' /etc/profile sed -i '/echo ""/d' /etc/profile ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0
debian/rules:
#!/usr/bin/make -f build: clean: dh_testdir dh_testroot dh_clean binary-indep: build install dh_clean dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_install dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary-arch: build install binary: binary-indep binary-arch .PHONY: build clean binary-arch binary install
$ cd .. $ dch
Sesuaikan dengan standar versi paket. Set -0kuliax1 dibelakang versi upstream untuk pemaketan Kuliax yang pertama kali dan belum ada di Debian. Set distribusi ke pengembangan saat ini: lumpia. Yang paling penting, tulis semua perubahan yang telah dilakukan pada paket
$ sudo pbuilder build fortunes-kernelnewbies_20060120-0kuliax1.dsc
Secara default, Hasil paket biner ada di direktori $BUILDRESULT
sudo dpkg -i ../fortunes-kernelnewbies_20060120-0kuliax1_all.deb
sudo apt-get remove --purge fortunes-kernelnewbies