octave-maintainers
[Top][All Lists]
Advanced

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

Re: Bug with pkg if only a single file is installed


From: Søren Hauberg
Subject: Re: Bug with pkg if only a single file is installed
Date: Thu, 14 Sep 2006 21:41:19 +0200

tor, 14 09 2006 kl. 21:26 +0200, skrev David Bateman:
> And what about the difference between "BuildRequires:" and "Requires:"
> options in RPM spec-files? I suppose Debian have similar options. Maybe
> the easiest solution is in fact something like
> 
> Mandriva: Requires: ImageMagick (> 6.2.0)
> Mandriva: BuildRequires: ImageMagick-devel (> 6.2.0)
> Mandriva: Requires: libtermcap2 (> 2.0.6)
> 
> This makes installing the right code in the RPM spec-file and debian
> rules file just a matter of stripping the keywords. In fact I think
> maybe something like
> 
> Suse Redhat: libtermcap (> 2.0.6)
> Mandriva Mandrake: libtermcap2 (> 2.0.6)
> RPM: Requires: ImageMagick (> 6.2.0)
> RPM: BuildRequires: ImageMagick-devel (> 6.2.0)
> 
> should be allowed, so that the DESCRIPTION files don't get too long.
That syntax looks good. I'm quite sure I get the RPM field though. Is
that the default for RPM based distros that aren't listed?

> Then the only question is how to probe the distribution. Unfortunately,
> although it looks like uname will be modified to give the distribution
> in the future it doesn't at the moment and so we have to you an indirect
> technique, something like
> 
> if [ -e "/etc/mandriva-release" ]; then
>   DIST=Mandriva
> elif [ -e "/etc/mandrake-release" ]; then
>   DIST=Mandrake
> elif [ -e "/etc/fedora-release" ]; then
>   DIST=Fedora
> elif [ -e "/etc/redhat-release" || -e "/etc/redhat_version" ]; then
>   DIST=Redhat
> elif [ -e "/etc/SuSE-release" ]; then
>   DIST=Suse
> elif [ -e "/etc/debian_version" || -e "/etc/debian_release"]; then
>   DIST=Debian
> elif [ -e "/etc/ubuntu-release" ];
>   DIST=Ubuntu
> elif [ -e "/etc/slackware-release" || -e "/etc/slackware_version" ]; then
>   DIST=Slackware
> elif [ -e "/etc/yellowdog-release" ]; then
>   DIST=Yellowdog
> elif [ -e "/etc/gentoo-release" ]; then
>   DIST=Gentoo
> elif [ `uname | grep -i mingw` ]; then
>   DIST=Mingw
> elif [ `uname | grep -i cygwin` ]; then
>   DIST=Cygwin
> else
>   echo "Can not identify the platform"
>   exit -1;
> fi
Assuming you've created a script called called "build-rpm.sh" that
creates an .rpm from a package, couldn't we simply do something like
  ./build-rpm.sh --distro=Fedora package_file
? That would make the script much more simple, and it would be much
harder to use.

> Having all of these platforms supported by a particular package would be
> upto the octave-forge maintainer on those platforms feeding back the
> necessary code for the DESCRIPTION files.
Agreed

Søren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]