Re: [CentOS] Single source repo, producing packages for CentOS 6 and 7, how?

2016-08-15 Thread Martinx - ジェームズ
On 9 August 2016 at 15:50, Peter  wrote:

> On 10/08/16 07:31, Martinx - ジェームズ wrote:
> > Guys,
> >
> >  I have a source code here, that produces RPM packages for CentOS 6, that
> > includes an Upstart Job and a ugly and minimal Init Script.
> >
> >  Now, I have it running on CentOS 7, via systemd, looks good!
> >
> >  However, my RPM package for CentOS 7 still includes the useless Upstart
> > and Init Scripts...
> >
> >  So, here is the question:
> >
> >  How are you guys managing this? I mean, I would like to have 1 single
> > source and 1 SPEC file for both CentOS 6 and 7, but no need to systemd
> > service files on 6 / no need to upstart job files on 7.
>
> %if 0%{?rhel} > 6
> # Stuff for CentOS 7 here
> %else
> # Stuff for CentOS 6 here
> %endif
>

Sweet... Thank you guys!
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Single source repo, producing packages for CentOS 6 and 7, how?

2016-08-09 Thread Peter
On 10/08/16 07:31, Martinx - ジェームズ wrote:
> Guys,
> 
>  I have a source code here, that produces RPM packages for CentOS 6, that
> includes an Upstart Job and a ugly and minimal Init Script.
> 
>  Now, I have it running on CentOS 7, via systemd, looks good!
> 
>  However, my RPM package for CentOS 7 still includes the useless Upstart
> and Init Scripts...
> 
>  So, here is the question:
> 
>  How are you guys managing this? I mean, I would like to have 1 single
> source and 1 SPEC file for both CentOS 6 and 7, but no need to systemd
> service files on 6 / no need to upstart job files on 7.

%if 0%{?rhel} > 6
# Stuff for CentOS 7 here
%else
# Stuff for CentOS 6 here
%endif


Peter
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Single source repo, producing packages for CentOS 6 and 7, how?

2016-08-09 Thread Frank Cox
On Tue, 9 Aug 2016 15:31:17 -0400
Martinx - ジェームズ wrote:

>  How are you guys managing this? I mean, I would like to have 1 single
> source and 1 SPEC file for both CentOS 6 and 7, but no need to systemd
> service files on 6 / no need to upstart job files on 7.

https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s06.html

-- 
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Single source repo, producing packages for CentOS 6 and 7, how?

2016-08-09 Thread Martinx - ジェームズ
Guys,

 I have a source code here, that produces RPM packages for CentOS 6, that
includes an Upstart Job and a ugly and minimal Init Script.

 Now, I have it running on CentOS 7, via systemd, looks good!

 However, my RPM package for CentOS 7 still includes the useless Upstart
and Init Scripts...

 So, here is the question:

 How are you guys managing this? I mean, I would like to have 1 single
source and 1 SPEC file for both CentOS 6 and 7, but no need to systemd
service files on 6 / no need to upstart job files on 7.

Cheers!
Thiago
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos