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

[Long]I need some help to make a debian package.



Hi.

I am trying to learn how to learn a debian package.

I decided to try with a small game called blockrage

(http://blockrage.sourceforge.net) but I can't create it.

I followed the instruction given in the new maintainer's guide and I can't see

where I am wrong.

I sum up here the steps I followed when I buid my package:

I first ran ./configure --prefix=/usr

then dh_make -e sebastien.marbrier@laposte.net -f ../blockrage-0.2.1.tar.gz

I choose the single package method.

The rules file generated below seems correct to me :

DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))

CFLAGS += -O0

else

CFLAGS += -O2

endif

config.status: configure

dh_testdir

# Add here commands to configure the package.

CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE)

--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man

--infodir=\$${prefix}/share/info

build: build-stamp

build-stamp: config.status

dh_testdir

# Add here commands to compile the package.

$(MAKE)

#docbook-to-man debian/blockrage.sgml > blockrage.1

touch build-stamp

clean:

dh_testdir

dh_testroot

rm -f build-stamp

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

-$(MAKE) distclean

ifneq "$(wildcard /usr/share/misc/config.sub)" ""

cp -f /usr/share/misc/config.sub config.sub

endif

ifneq "$(wildcard /usr/share/misc/config.guess)" ""

cp -f /usr/share/misc/config.guess config.guess

endif

dh_clean

install: build

dh_testdir

dh_testroot

dh_clean -k

dh_installdirs

# Add here commands to install the package into debian/blockrage.

$(MAKE) install prefix=$(CURDIR)/debian/blockrage/usr

# 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_installchangelogs CHANGES

dh_installdocs

dh_installexamples

# dh_install

# dh_installmenu

# dh_installdebconf

# dh_installlogrotate

# dh_installemacsen

# dh_installpam

# dh_installmime

# dh_installinit

# dh_installcron

# dh_installinfo

dh_installman

dh_link

dh_strip

dh_compress

dh_fixperms

# dh_perl

# dh_python

# 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

Now I tale a look to the control file. blockrage seems to need anything else

than libsdl1.2.x. So I wrote the control file like this :

Source: blockrage

Section: games

Priority: optional

Maintainer: Marbrier Sebastien <sebastien.marbrier@laposte.net>

Build-Depends: debhelper (>= 4.0.0), autotools-dev, libsdl1.2-dev

Standards-Version: 3.6.1

Package: blockrage

Architecture: any

Depends: ${shlibs:Depends}, ${misc:Depends}

Description: Block Rage, an arcade game with addictive gameplay.

Block Rage will be a falling blocks game with detailed graphics and animated

plasmatic backgrounds.

You will be able to challenge your friend in a 2-player hotseat mode!

It is strongly inspired by a superb DOS classic.

I skip to paste copyright and changelog since they are not interesting.

I deleted the following files :

README.Debian,cron.d.ex,emacsen-*.ex,init.d.ex,manpage.1.ex,

manpage.sgml.ex,file:/home/sebast/test_pkg/blockrage-0.2.1/debian/blockrage-default.ex

blockrage.doc-base.EX, blockrage-default.ex

I added the following lines in conffiles.ex :

/etc/games/blockrage/blockrage.rc

/etc/games/blockrage/blockrage.cfg

I don't think dirs file is useful here but in case of, I wrote in it :

/etc/games/blockrage

/usr/share/blockrage

In menu.ex, I have:

?package(blockrage):needs="X11" section="Games/Puzzles"\

title="blockrage" command="/usr/games/blockrage"

Since I am not supposed to change the followings : postinst.ex, preinst.ex,

postrm.ex, prerm.ex I let them as they were created.

watch.ex is like this. uscan dind't returned me anything so I guess it ok.

http://puzzle.dl.sourceforge.net/sourceforge/blockrage/blockrage-(.*)\.tar\.gz

Now I use dpkg-buildpackage -rfakeroot in the main directory.

And the folowing lines tell me it tries to install files in /usr/local and some permission are missing.

make[1]: Entering directory `/home/sebast/test_pkg/blockrage-0.2.1'

./inst -dp 755 -t /usr/local/share/blockrage

./inst -dp 755 -t /etc/games/blockrage

./inst -dp 755 -fp 644 -t /usr/local/share/blockrage ./data/*

installing /usr/local/share/blockrage/test

installing /usr/local/share/blockrage/test/dataset.cfg

cp: ne peut créer le fichier régulier `/usr/local/share/blockrage/test/dataset.cfg': Permission non accordée

I can't see where have done a mistake, can someone can help me please?

Marbrier Sébastien.


Reply to: