[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building packages using dh_make (was: k3b)



On Saturday 28 December 2002 21:17, Bruce Sass wrote:
> On Sat, 28 Dec 2002, Hendrik Sattler wrote:
> <...>
>
> > If there are really not packages available anywhere, where can I
> > find exact steps to debianize a KDE program without too much work?
>
> Hmmm, dh-make, maybe.
> Awhile back I got a patch in that broke out the templates used to do
> a Debianization, KDE was the example template (provided by Ivan
> Moore) I used.  I doubt it has been kept up to date, but it would
> probably not be too much work to bring it up to spec for the

Below are two adapted file I use to build rough initial packages. I keep 
them in /home/michael/projects/packaging/dh_make_kde thus to get 
dh_make to use these files I call it like this

dh_make --templates /home/michael/projects/packaging/dh_make_kde

Michael

----> menu.ex ---->---->---->---->---->---->---->---->---->
?package(#PACKAGE#):needs=X11 section=Apps/see-menu-manual\
  title="#PACKAGE#" hints="KDE" kderemove="y" 
command="/usr/bin/#PACKAGE#"
---->---->---->---->---->---->---->---->---->---->---->---->

----> rules ---->---->---->---->---->---->---->---->---->---->
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=3

DH_ALWAYS_EXCLUDE=CVS

-include debian/debiandirs

debian/debiandirs: admin/debianrules
	perl -w admin/debianrules echodirs > debian/debiandirs

#DPKG_ARCH#

config.status: configure
	dh_testdir
	# Add here commands to configure the package.
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
$(configkde)


build: build-stamp

build-stamp:  config.status
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE)
	#/usr/bin/docbook-to-man debian/#PACKAGE#.sgml > #PACKAGE#.1

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	-#CLEAN#

	dh_clean debian/debiandirs

debian-clean:
	dh_testdir
	-rm -f build-stamp
	if test -d CVS; then \
	  make -f admin/Makefile.common cvs-clean ;\
	fi
	-make distclean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/#PACKAGE#.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/#PACKAGE#


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	dh_installmenu
	dh_undocumented #PACKAGE#.1
	dh_installchangelogs #CHANGELOGS#
	dh_link
	dh_strip
	dh_compress --exclude=.docbook --exclude=.bz2
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

---->---->---->---->---->---->---->---->---->---->---->---->

-- 
Michael Schuerig                  If at first you don't succeed...
mailto:schuerig@acm.org           try, try again.
http://www.schuerig.de/michael/   --Jerome Morrow, "Gattaca"



Reply to: