[Ubuntu 7.10+dh_make] Installation von Menüeinträgen

Quidoff

Lieutenant
Registriert
Feb. 2005
Beiträge
897
Hallo,
wie kann ich beim Erstellen eines deb-Packages festlegen, dass auch ein Eintrag im Ubuntumenü erstellt wird?

Ich lege zuerst den debian-Ordner mittels dh_make im Sourcedirectory an.

Hier steht, dass das in einer menu-Datei passieren soll, deren Syntax leider nicht näher beschrieben wird.

Hier steht allerdings, dass Ubuntu nicht das Debianmenü verwendet, sondern die .desktop Dateien.

Was stimmt also?

Wie müssten die Dateien aussehen?
Vor allem soll im Menü ein Icon des Programms angezeigt werden, aber woher weiß ich den Pfad zu diesem Icon und dessen Name?

Ich versuche testweiße xmms mit Menüeintrag zu kompilieren.

Das Icon liegt im Source-Ordner unter $(src_dir)/xmms/xmms_mini.xpm
Die xmms.desktop liegt im Source-Ordner unter $(src_dir)/debian und sieht so aus:
Code:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=XMMS
Exec=xmms
Icon=/usr/share/pixmaps/xmms_mini.xpm
Terminal=false
Type=Application
StartupNotify=false
Categories=AudioVideo;Player;
OnlyShowIn=GNOME;XFCE;
MimeType=audio/mpeg;

Im selben Ordner liegt die Datei dirs:
Code:
usr
usr/bin
usr/sbin
usr/share
usr/share/pixmaps
usr/share/applications

Und schließlich die rules:
Code:
#!/usr/bin/make -f
  
#include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

# Add here any variable or target overrides you need.
makebuilddir/xmms::
	./configure

build/xmms::
	make

install/xmms::
	make install DESTDIR=$(CURDIR)/debian/xmms
	cp xmms/xmms_mini.xpm debian/xmms/usr/share/pixmaps
	cp debian/xmms.desktop debian/xmms/usr/share/applications

clean::
	-make clean

Ich erhalte allerdings folgenden Fehler bei debuild -uc -us:
Code:
cp xmms/xmms_mini.xpm debian/xmms/usr/share/pixmaps
cp: cannot create regular file `debian/xmms/usr/share/pixmaps': No such file or directory
make: *** [install/xmms] Error 1
debuild: fatal error at line 1247:
fakeroot debian/rules binary failed
Ein Blick in $(src_dir)/debian/xmms/usr verrät: Die erforderlichen Ordner, die in der Datei dirs angegeben sind, wurden nicht erstellt.
Folglich kann also das Icon auch nicht dorthin kopiert werden.

Wieso werden diese Ordner nicht erstellt?

//edit
Ohne CDBS bin ich in der Lage, die Dateien zu verschieben.
Meine rules sieht so aus:
Code:
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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


# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


config.status: configure
	dh_testdir
	# Add here commands to configure the package.
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
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"


build: build-stamp

build-stamp:  config.status
	dh_testdir

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

	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp 

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean
	rm -f config.sub config.guess

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/xmms.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xmms
	cp xmms/xmms_mini.xpm debian/xmms/usr/share/pixmaps
	cp debian/xmms.desktop debian/xmms/usr/share/applications


# 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 ChangeLog
	dh_installdocs
	dh_installexamples
#	dh_install
#	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_python
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
#	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
Allerdings bricht das Kompilieren mit folgender Fehlermeldung ab:
Code:
.libs/about.o: In function `oss_about':
about.c:(.text+0x71): undefined reference to `xmms_show_message'
.libs/configure.o: In function `configure_win_ok_cb':
configure.c:(.text+0x229): undefined reference to `xmms_cfg_open_default_file'
configure.c:(.text+0x259): undefined reference to `xmms_cfg_write_int'
configure.c:(.text+0x286): undefined reference to `xmms_cfg_write_int'
configure.c:(.text+0x2b3): undefined reference to `xmms_cfg_write_int'
configure.c:(.text+0x2e0): undefined reference to `xmms_cfg_write_int'
configure.c:(.text+0x30d): undefined reference to `xmms_cfg_write_boolean'
configure.c:(.text+0x33a): undefined reference to `xmms_cfg_write_boolean'
configure.c:(.text+0x367): undefined reference to `xmms_cfg_write_string'
configure.c:(.text+0x394): undefined reference to `xmms_cfg_write_boolean'
configure.c:(.text+0x3c1): undefined reference to `xmms_cfg_write_string'
configure.c:(.text+0x3cd): undefined reference to `xmms_cfg_write_default_file'
configure.c:(.text+0x3d9): undefined reference to `xmms_cfg_free'
.libs/audio.o: In function `oss_write_audio':
audio.c:(.text+0x647): undefined reference to `get_current_effect_plugin'
audio.c:(.text+0x650): undefined reference to `effects_enabled'
audio.c:(.text+0x784): undefined reference to `effects_enabled'
audio.c:(.text+0x816): undefined reference to `xmms_usleep'
.libs/audio.o: In function `oss_flush':
audio.c:(.text+0x212f): undefined reference to `xmms_usleep'
.libs/audio.o: In function `oss_loop':
audio.c:(.text+0x24a3): undefined reference to `xmms_usleep'
.libs/audio.o: In function `oss_open':
audio.c:(.text+0x2b01): undefined reference to `xmms_check_realtime_priority'
.libs/init.o: In function `oss_init':
init.c:(.text+0x88): undefined reference to `xmms_cfg_open_default_file'
init.c:(.text+0xc1): undefined reference to `xmms_cfg_read_int'
init.c:(.text+0xee): undefined reference to `xmms_cfg_read_int'
init.c:(.text+0x11b): undefined reference to `xmms_cfg_read_int'
init.c:(.text+0x148): undefined reference to `xmms_cfg_read_int'
init.c:(.text+0x175): undefined reference to `xmms_cfg_read_boolean'
init.c:(.text+0x1a2): undefined reference to `xmms_cfg_read_boolean'
init.c:(.text+0x1cf): undefined reference to `xmms_cfg_read_string'
init.c:(.text+0x1fc): undefined reference to `xmms_cfg_read_boolean'
init.c:(.text+0x229): undefined reference to `xmms_cfg_read_string'
init.c:(.text+0x235): undefined reference to `xmms_cfg_free'
collect2: ld returned 1 exit status
make[4]: *** [libOSS.la] Error 1
make[4]: Leaving directory `/home/korn/Desktop/xmms-1.2.11/Output/OSS'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/korn/Desktop/xmms-1.2.11/Output'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/korn/Desktop/xmms-1.2.11'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/korn/Desktop/xmms-1.2.11'
make: *** [build-stamp] Error 2
debuild: fatal error at line 1247:
debian/rules build failed

//edit
Problem gelöst.
Ich musste den letzten Parameter (LDFLAGS="-Wl,-z,defs") von ./configure aus der rules entfernen.
 
Zuletzt bearbeitet: (Problem gelöst)
Zurück
Oben