mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-10 04:08:50 +00:00
rpm spec: fix version numbering when building alpha, beta, rc
We want to ensure smooth upgrades when doing rpm -U throughout the release cycle so this change implements the scheme documented at: http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
5da6aa8c71
commit
9588a6cecb
13
configure.ac
13
configure.ac
@ -1,7 +1,18 @@
|
|||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT([lxc], [1.0.0.alpha2])
|
m4_define([lxc_version_major], 1)
|
||||||
|
m4_define([lxc_version_minor], 0)
|
||||||
|
m4_define([lxc_version_micro], 0)
|
||||||
|
m4_define([lxc_version_beta], [alpha2])
|
||||||
|
|
||||||
|
m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
|
||||||
|
m4_define([lxc_version],
|
||||||
|
[ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])])
|
||||||
|
|
||||||
|
AC_INIT([lxc], [lxc_version])
|
||||||
|
AC_SUBST(LXC_VERSION_BASE, lxc_version_base)
|
||||||
|
AC_SUBST(LXC_VERSION_BETA, lxc_version_beta)
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
AC_CONFIG_AUX_DIR([config])
|
AC_CONFIG_AUX_DIR([config])
|
||||||
|
18
lxc.spec.in
18
lxc.spec.in
@ -23,11 +23,21 @@
|
|||||||
%global with_python %{?_with_python: 1} %{?!_with_python: 0}
|
%global with_python %{?_with_python: 1} %{?!_with_python: 0}
|
||||||
%global with_lua %{?_with_lua: 1} %{?!_with_lua: 0}
|
%global with_lua %{?_with_lua: 1} %{?!_with_lua: 0}
|
||||||
|
|
||||||
|
# RPM needs alpha/beta/rc in Release: not Version: to ensure smooth
|
||||||
|
# package upgrades from alpha->beta->rc->release. For more info see:
|
||||||
|
# http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease
|
||||||
|
%if "x@LXC_VERSION_BETA@" != "x"
|
||||||
|
%global beta_rel @LXC_VERSION_BETA@
|
||||||
|
%global beta_dot .%{beta_rel}
|
||||||
|
%else
|
||||||
|
%global norm_rel 1
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: @PACKAGE@
|
Name: @PACKAGE@
|
||||||
Version: @VERSION@
|
Version: @LXC_VERSION_BASE@
|
||||||
Release: 1%{?dist}
|
Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist}
|
||||||
URL: http://linuxcontainers.org
|
URL: http://linuxcontainers.org
|
||||||
Source: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
|
Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz
|
||||||
Summary: Linux Containers userspace tools
|
Summary: Linux Containers userspace tools
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -75,7 +85,7 @@ The %{name}-lua package contains %{name} bindings for lua.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n %{name}-%{version}%{?beta_dot}
|
||||||
%build
|
%build
|
||||||
PATH=$PATH:/usr/sbin:/sbin %configure $args \
|
PATH=$PATH:/usr/sbin:/sbin %configure $args \
|
||||||
%if %{with_lua}
|
%if %{with_lua}
|
||||||
|
Loading…
Reference in New Issue
Block a user