Ignacio Valdes wrote:
Here's what you could do:On Thu, Apr 29, 2010 at 9:03 PM, Thomas Goirand <tho...@goirand.fr> wrote:Ignacio Valdes wrote:It is a very complex, large package. Does anyone know the mechanics of doing introspection in postinst for the control file defined variables?Exactly why the postinst generation method that has been given as a (pretty good) solution would not work?Required to produce versions for both rpm and deb. No introspection means not easy to convert this from rpm to deb which is where this started. This would make it much easier to produce both deb and rpm versions if it has the ability to introspect those variables. -- IV DEBVERS=head -n 1 debian/changelog | cut -d'(' -f2 | cut -d')' -f1 | cut -d'-' -f1 sed -i "s/__VERSION__/${DEBVERS}/" mypackage.spec sed "s/__VERSION__/${DEBVERS}/" debian/master.postinst >debian/postinst This way, you are controlling the version variables of both your RPM and your Debian package using what's in the debian/changelog. Then, if you have some of your postinst script that is the same in both OS, then you might want to have an OS independent script in a place like /usr/share/PKGNAME/myscript, then just source it from spec file / postinst. I don't see this as being so hard... To my experience, it's a lot more easy to be able to maintain BOTH the rpm and the Debian package rather than just porting from one to another. If you want to avoid redundancy and want to factor things a bit. Maybe you could suggest some modifications to the maintainer of the RPM package so you can share changes with him later on. Just my 2 cents, hoping it helped. Thomas -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bdabf89.8080...@goirand.fr |
- Re: Specifying %{variable} in control file for use ... Paul Wise
- Re: Specifying %{variable} in control file for use ... Ignacio Valdes
- Re: Specifying %{variable} in control file for use ... Goswin von Brederlow
- Re: Specifying %{variable} in control file for use ... Ignacio Valdes
- Re: Specifying %{variable} in control file for... Russ Allbery
- Re: Specifying %{variable} in control file for... Ignacio Valdes
- Re: Specifying %{variable} in control file... Russ Allbery
- Re: Specifying %{variable} in control file... Ignacio Valdes
- Re: Specifying %{variable} in control ... Thomas Goirand
- Re: Specifying %{variable} in control ... Ignacio Valdes
- Re: Specifying %{variable} in cont... Thomas Goirand
- Re: Specifying %{variable} in cont... Ignacio Valdes
- Re: Specifying %{variable} in... Boyd Stephen Smith Jr.
- Re: Specifying %{variable} in... Goswin von Brederlow
- Re: Specifying %{variable} in... Ignacio Valdes
- Re: Specifying %{variable... Bernhard R. Link
- Re: Specifying %{variable... Thomas Goirand
- Re: Specifying %{variable} in cont... Kris Deugau
- Re: Specifying %{variable} in control ... Ignacio Valdes
- Re: Specifying %{variable} in cont... Russ Allbery