Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-25 Thread Eric Noulard
2010/7/25 Olaf van der Spek :
> On Sun, Jul 25, 2010 at 7:13 PM, Eric Noulard  wrote:
>> Switching cmake-devel in order to go on with this discussion
>> on CPackDeb related patches?
>
> I don't see cmake-devel at http://www.cmake.org/cmake/help/mailing.html
> How come?

Don't know.

It is not listed there but it is accessible here:
http://www.cmake.org/mailman/listinfo/cmake-developers

The list is usually used by CMake developers/contributos to
discuss issue which would usually annoy "normal" CMake users :-)

- Like how use git for doing that?
- How come my commit is refused by git with this cryptic message "blah blah..."


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-25 Thread Olaf van der Spek
On Sun, Jul 25, 2010 at 7:13 PM, Eric Noulard  wrote:
> Switching cmake-devel in order to go on with this discussion
> on CPackDeb related patches?

I don't see cmake-devel at http://www.cmake.org/cmake/help/mailing.html
How come?

Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-25 Thread Eric Noulard
2010/7/25 Alexander Neundorf :
> On Thursday 22 July 2010, Eric Noulard wrote:
>> 2010/7/22 Olaf van der Spek :
>> > On Thu, Jul 22, 2010 at 11:08 PM, Eric Noulard 
> wrote:
>> >> Yes it should, if ever the proposed patch
>> >> http://public.kitware.com/Bug/view.php?id=10292
>> >> is merged as-is.
>> >
>> > What's the delay?
>>
>> I do not have an authoritative answer,
>> I'm not Kitware employee just a bare CMake contributor.
>
> Don't you have commit access ?

Yes I do.

But I was granted commit access for CPackRPM and I don't want
to abuse my commit "trust" on every patch I found OK :-)

Switching cmake-devel in order to go on with this discussion
on CPackDeb related patches?


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-25 Thread Alexander Neundorf
On Thursday 22 July 2010, Eric Noulard wrote:
> 2010/7/22 Olaf van der Spek :
> > On Thu, Jul 22, 2010 at 11:08 PM, Eric Noulard  
wrote:
> >> Yes it should, if ever the proposed patch
> >> http://public.kitware.com/Bug/view.php?id=10292
> >> is merged as-is.
> >
> > What's the delay?
>
> I do not have an authoritative answer,
> I'm not Kitware employee just a bare CMake contributor.

Don't you have commit access ?

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Eric Noulard
2010/7/22 Olaf van der Spek :
> On Thu, Jul 22, 2010 at 11:08 PM, Eric Noulard  wrote:
>> Yes it should, if ever the proposed patch
>> http://public.kitware.com/Bug/view.php?id=10292
>> is merged as-is.
>
> What's the delay?

I do not have an authoritative answer,
I'm not Kitware employee just a bare CMake contributor.

I let Kitware employee answer that one.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Olaf van der Spek
On Thu, Jul 22, 2010 at 11:08 PM, Eric Noulard  wrote:
> Yes it should, if ever the proposed patch
> http://public.kitware.com/Bug/view.php?id=10292
> is merged as-is.

What's the delay?

Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Eric Noulard
2010/7/22 Olaf van der Spek :
> On Thu, Jul 22, 2010 at 4:08 PM, Freddie Witherden
>  wrote:
>> I'll try adding a check for `rpmbuild` to my CMakeLists before enabling RPM 
>> packages.  This seems quite a nice solution as users should always get TGZ 
>> and DEB and RPM if possible.  From what I gather producing DEBs has no 
>> associated dependencies.
>
> Won't the deb generator soon have a dependency on the tool to generate
> the dependencies list?

Yes it should, if ever the proposed patch
http://public.kitware.com/Bug/view.php?id=10292
is merged as-is.

My opinion concerning DEB and RPM is that it seems better
to rely on specific tools (dpkg-xxx and rpm/rpmbuild) if we want to
get "proper" package.

Trying not to depends on those tools lower the possibility
of the produce package (like lacking auto-dependencies)
and/or produce bad behaving package.

We may even think that building an rpm on a debian based host
is a non-sense even if rpm tools can be installed on debian.

Note that if ever ones lacks some package format support
alien may be the tool of choice: http://kitenet.net/~joey/code/alien
even if alien itself relies on supporting tools...

but now I'm really goiing off-topic ...stopping here.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Olaf van der Spek
On Thu, Jul 22, 2010 at 4:08 PM, Freddie Witherden
 wrote:
> I'll try adding a check for `rpmbuild` to my CMakeLists before enabling RPM 
> packages.  This seems quite a nice solution as users should always get TGZ 
> and DEB and RPM if possible.  From what I gather producing DEBs has no 
> associated dependencies.

Won't the deb generator soon have a dependency on the tool to generate
the dependencies list?

Olaf
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Freddie Witherden
On 22 Jul 2010, at 07:02, Rolf Eike Beer wrote:
> Am Thursday 22 July 2010 schrieb Freddie Witherden:
>> I wish to know how I can have CMake/CPack determine if it is possible to
>> build an RPM or DEB package on the system (so if all the required
>> utilities are installed) and if so to go ahead and package them.
> 
> FIND_PROGRAM(rpmbuild) or things like that?

I'll try adding a check for `rpmbuild` to my CMakeLists before enabling RPM 
packages.  This seems quite a nice solution as users should always get TGZ and 
DEB and RPM if possible.  From what I gather producing DEBs has no associated 
dependencies.

This way they can choose which one they want to use and distribute others if 
they want.

Doing the checks in my CMakeLists file should also reduce the chance of a 
package failing to build when the user runs `make package`.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-22 Thread Eric Noulard
2010/7/22 Freddie Witherden :
> Hi,
>
> I use CPack in my project to build binary packages as an alternative to `make
> install`.  However, I am interested in getting my project to automatically
> detect which packages to build.
>
> Currently I have TGZ set and then require the user to pass the appropriate
> parameter to `cmake` (such as -DCPACK_BINARY_DEB:BOOL=on) to have deb/rpm
> packages made.
>
> I wish to know how I can have CMake/CPack determine if it is possible to build
> an RPM or DEB package on the system (so if all the required utilities are
> installed) and if so to go ahead and package them.

I did wrote a small CMake scripts which may help you for this.
add
include(SystemSpecificInformations)
to your CMakeLists.txt

then
SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR
should contain the appropriate name of the CPack generator to be used
on the host.

Note however that the current script does not check whether if appropriate tool
(dpkg, rpmbuild, NSIS,...) are installed but basically associate an
host type with
a "prefered" CPACK_GENERATOR.

Windows --> NSIS
Debian --> DEB
Ubuntu --> DEB
Fedora --> RPM
SuSE --> RPM
other linux --> TGZ

> This would simplify things for people who checkout the project as they just
> need to type `make package` and can be sure of the appropriate package being
> built.
>
> However I am unsure how to reliably go about the detection process.  (Asking
> CMake to produce an RPM package on my Debian Squeeze system only fails when
> one tries to make the package -- after `cmake` has run.)

Yes and normally it fails by saying that you need to have "rpmbuild"
installed right?

something like:
CMake Error at /usr/share/cmake-2.8/Modules/CPackRPM.cmake:195 (MESSAGE):
  RPM package requires rpmbuild executable

Now I'm not sure we may do anything better, because you may effectively
want to build RPM on a debian host, even if this is not the 'native
package format'.
In fact on your Debian-based system if you "aptitude install rpm" you'll be able
to build RPM just fine.

I personnally usually build both DEB and RPM on my debian host.
This way I may easily build RPM for my collegue that do not want to
"compile themself".

That said you are right, in your case it would be interesting to build
the "prefered" package
automatically. May be you can file a feature request on the bug
tracker and we may submit
a enhance version of my "SystemSpecificInformations.cmake" which may
be integrated in CMake upstream.

What do other listeners think about that?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


SystemSpecificInformations.cmake
Description: Binary data
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-21 Thread Rolf Eike Beer
Am Thursday 22 July 2010 schrieb norulez:
> This shouldn't work, because you could build deb packages on redhat systems
> with cpack without any deb tools installed

Well, in that case you don't need to search for anything debian-like and can 
always use that generator. Then you only need to check for rpmbuild ;)

Eike


signature.asc
Description: This is a digitally signed message part.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-21 Thread norulez
This shouldn't work, because you could build deb packages on redhat systems 
with cpack without any deb tools installed

Am 22.07.2010 um 08:02 schrieb Rolf Eike Beer :

> Am Thursday 22 July 2010 schrieb Freddie Witherden:
> 
>> I wish to know how I can have CMake/CPack determine if it is possible to
>> build an RPM or DEB package on the system (so if all the required
>> utilities are installed) and if so to go ahead and package them.
> 
> FIND_PROGRAM(rpmbuild) or things like that?
> 
> Eike
> ___
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-21 Thread Rolf Eike Beer
Am Thursday 22 July 2010 schrieb Freddie Witherden:

> I wish to know how I can have CMake/CPack determine if it is possible to
> build an RPM or DEB package on the system (so if all the required
> utilities are installed) and if so to go ahead and package them.

FIND_PROGRAM(rpmbuild) or things like that?

Eike


signature.asc
Description: This is a digitally signed message part.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CPack: Detecting if to build DEB/RPM packages

2010-07-21 Thread Freddie Witherden
Hi,

I use CPack in my project to build binary packages as an alternative to `make 
install`.  However, I am interested in getting my project to automatically 
detect which packages to build.

Currently I have TGZ set and then require the user to pass the appropriate 
parameter to `cmake` (such as -DCPACK_BINARY_DEB:BOOL=on) to have deb/rpm 
packages made.

I wish to know how I can have CMake/CPack determine if it is possible to build 
an RPM or DEB package on the system (so if all the required utilities are 
installed) and if so to go ahead and package them.

This would simplify things for people who checkout the project as they just 
need to type `make package` and can be sure of the appropriate package being 
built.

However I am unsure how to reliably go about the detection process.  (Asking 
CMake to produce an RPM package on my Debian Squeeze system only fails when 
one tries to make the package -- after `cmake` has run.)

Regards, Freddie.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake