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

Estoy un poco atascado



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hola, he estado investigando sobre el tema de hacer dos paquetes a partir de 
un mismo fuente. Si recordais, estaba tratando de crear dos paquetes para el 
software digitemp, que requería dos compilaciones distintas, una para cada 
tipo de adaptador. 
El caso es que me he estado leyendo la debian-policy y mirando algún que otro 
paquete (que me resultan un tanto complicado) además de estar modificando el 
debian/control y debian/rules y, también hay que decirlo, dando algunos palos 
de ciego. 
Tal como me recomendó José Carlos García Sogo, he estado modificando el 
debian/rules para que maneje los dos paquetes. También he estado siguiendo lo 
que me dicen en la debian-policy sobre crear dos paquetes, que no es mucho (o 
yo no lo he encontrado). He puesto que las dependencias del target binary 
sean dos, una para una de las versiones (ds9097) y la otra para la otra 
compilación (ds9097u), intentando que el proceso sea el siguiente:
hago un clean, compilo para ds9097, empaqueto, hago clean, compilo para 
ds9097u, empaqueto y hago clean. Supongo que la estoy cagando 
estrepitósamente en el debian/rules y/o en alguna configuración de debian/*, 
porque al ejecutar dpkg-builldpackage me genera dos paquetes debian, pero en 
ninguno de ellos se incluye el binario en cuestión (solo la documentación y 
la página man). Después de eso, se me queda 3 directorios, el debian/digitemp 
(que contiene los dos binarios, digitemp y digitemp~), el 
debian/digitemp-ds9097 y el debian/digitemp-ds9097u. Supongo que estos 
ficheros deberán ser borrados por el script automáticamente.
En debian/ tengo varios ficheros como digitemp-ds9097.docs para indicar los 
ficheros de documentación de cada paquete (que son los mismos). También hay 
varios ficheros files que no se para qué se usan en concreto:
golan@io:~/develop/digitemp2/digitemp-3.1.0/debian$ ls -l
total 56
- -rw-r--r--    1 golan    golan         304 May 27 13:54 README.Debian
- -rw-r--r--    1 golan    golan         225 May 27 13:54 changelog
- -rw-r--r--    1 golan    golan           2 May 27 13:54 compat
- -rw-r--r--    1 golan    golan         997 May 27 13:54 control
- -rw-r--r--    1 golan    golan         503 May 27 13:54 copyright
- -rw-r--r--    1 golan    golan          36 May 27 13:54 digitemp-ds9097.docs
- -rw-r--r--    1 golan    golan           9 May 27 13:54 digitemp-ds9097.files
- -rw-r--r--    1 golan    golan          36 May 27 13:54 digitemp-ds9097u.docs
- -rw-r--r--    1 golan    golan           9 May 27 13:54 digitemp-ds9097u.files
- -rw-r--r--    1 golan    golan        3003 May 27 13:54 digitemp.1
- -rw-r--r--    1 golan    golan          17 May 27 13:54 dirs
- -rw-r--r--    1 golan    golan         115 May 28 13:58 files
- -rwxr-xr-x    1 golan    golan        3658 May 28 13:59 rules
- -rw-r--r--    1 golan    golan         338 May 27 13:54 watch

Por otro lado, alguien sabe qué hace la opción -a de dh_clean? Que yo sepa no 
viene en su página man.

Agradecería cualquier comentario al respecto y, mejor, alguna indicación de si 
voy bien y por dónde puedo seguir mirando :-). Os incluyo los ficheros rules 
y control por si quereis echarle un vistazo. Si alguien me quiere echar una 
mano y mirar el resto de fuentes, lo puedo poner todo en internet.  
¿hay algún canal debian-devel-es en el irc?

Muchas gracias y perdonad si soy un plasta :-).

- -- 
Jesús Roncero Franco
Sevilla - Spain
GPG key Available
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+1KtbDbnxmoY7kKQRAoxcAJwJI5VX8+YhRtyA0ClLDQpbcYVASwCePa3A
GI/6hipMMsDPuIj0/qoVBhU=
=nVqw
-----END PGP SIGNATURE-----
Source: digitemp
Section: electronics
Priority: optional
Maintainer: Jesus Roncero <jesus@roncero.org>
Build-Depends: debhelper (>> 4.0.0)
Standards-Version: 3.5.8

Package: digitemp-ds9097
Architecture: any
Conflicts: digitemp-ds9097u
Suggests: rrdtool
Depends: ${shlibs:Depends} ${misc:Depends}
Description: Program to read from temperature sensors in a 1-wire net. DS9097
 This is a program that reads data comming from a 1-wire network using 
 a passive adapter (DS9097) that connects to the serial port. 
 .
 It can also have different branches using the DS2409 couplers.

Package: digitemp-ds9097u
Architecture: any
Conflicts: digitemp-ds9097
Suggests: rrdtool
Depends: ${shlibs:Depends} ${misc:Depends}
Description: Program to read from temperature sensors in a 1-wire net. DS9097
 This is a program that reads data comming from a 1-wire network using 
 a DS2480B chip based adapter (DS9097) connected to the serial port. 
 .
 It can also have different branches using the DS2409 couplers.
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

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

# This has to be exported to make some magic below work.
export DH_OPTIONS



CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp


#Architecture 
build: 


build-ds9097: clean configure-stamp

	dh_testdir
	
	$(MAKE) ds9097
	touch build-stamp


build-ds9097u: clean configure-stamp

	dh_testdir
	$(MAKE) ds9097u
	touch build-stamp


build-arch: build-arch-stamp
build-arch-stamp: configure-stamp 
	
	# Add here commands to compile the arch part of the package.
	#$(MAKE) 

build-indep: build-indep-stamp
build-indep-stamp: configure-stamp 
	
	# Add here commands to compile the indep part of the package.
	#$(MAKE) doc

clean:
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp build-indep-stamp config-stamp build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	-$(MAKE) clean
	
	dh_clean

#install: install-indep install-arch

install-ds9097:
	dh_testdir
	dh_testroot
	dh_clean -k -a
	dh_installdirs -a

	# Add here commands to install the arch part of the package into 
	# debian/tmp.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/digitemp

	#dh_install -a


install-ds9097u:
	dh_testdir
	dh_testroot
	dh_clean -k -a
	dh_installdirs -a

	# Add here commands to install the arch part of the package into 
	# debian/tmp.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/digitemp

	#dh_install -a

binary-indep-ds9097: build-ds9097 install-ds9097
	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_installinit
#       dh_installcron
#       dh_installinfo
	dh_installman debian/digitemp.1
	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-indep-ds9097u: build-ds9097u install-ds9097u
	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_installinit
#       dh_installcron
#       dh_installinfo
	dh_installman debian/digitemp.1
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#       dh_perl
#       dh_python
#       dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture independant packages using the common target.
#binary-indep: build-indep install-indep
#	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
#binary-arch: build-arch install-arch
#	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary: binary-indep-ds9097 binary-indep-ds9097u  
#binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure build-ds9097 build-ds9097u install-ds9097 install-ds9097u binary-indep-ds9097 binary-indep-ds9097u

Reply to: