فهرست منبع

spec: Modernize spec to comply with newest Fedora

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 8 سال پیش
والد
کامیت
eec4d71020
1فایلهای تغییر یافته به همراه6 افزوده شده و 22 حذف شده
  1. 6 22
      corosync.spec.in

+ 6 - 22
corosync.spec.in

@@ -23,17 +23,12 @@ Summary: The Corosync Cluster Engine and Application Programming Interfaces
 Version: @version@
 Version: @version@
 Release: 1%{?gitver}%{?dist}
 Release: 1%{?gitver}%{?dist}
 License: BSD
 License: BSD
-Group: System Environment/Base
 URL: http://corosync.github.io/corosync/
 URL: http://corosync.github.io/corosync/
 Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
 Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
 
 
 # Runtime bits
 # Runtime bits
 # The automatic dependency overridden in favor of explicit version lock
 # The automatic dependency overridden in favor of explicit version lock
 Requires: corosynclib%{?_isa} = %{version}-%{release}
 Requires: corosynclib%{?_isa} = %{version}-%{release}
-Requires(pre): /usr/sbin/useradd
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-Conflicts: openais <= 0.89, openais-devel <= 0.89
 
 
 # Build bits
 # Build bits
 
 
@@ -55,11 +50,12 @@ BuildRequires: net-snmp-devel
 BuildRequires: dbus-devel
 BuildRequires: dbus-devel
 %endif
 %endif
 %if %{with systemd}
 %if %{with systemd}
-BuildRequires: systemd-units
+%{?systemd_requires}
+BuildRequires: systemd
 BuildRequires: systemd-devel
 BuildRequires: systemd-devel
-Requires(post): systemd
-Requires(preun): systemd
-Requires(postun): systemd
+%else
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
 %endif
 %endif
 %if %{with xmlconf}
 %if %{with xmlconf}
 Requires: libxslt
 Requires: libxslt
@@ -68,8 +64,6 @@ Requires: libxslt
 BuildRequires: libcgroup-devel
 BuildRequires: libcgroup-devel
 %endif
 %endif
 
 
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
 %prep
 %prep
 %setup -q -n %{name}-%{version}%{?gittarver}
 %setup -q -n %{name}-%{version}%{?gittarver}
 
 
@@ -109,8 +103,6 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 make %{_smp_mflags}
 make %{_smp_mflags}
 
 
 %install
 %install
-rm -rf %{buildroot}
-
 make install DESTDIR=%{buildroot}
 make install DESTDIR=%{buildroot}
 
 
 %if %{with dbus}
 %if %{with dbus}
@@ -133,7 +125,6 @@ install -m 644 init/corosync.sysconfig.example \
    %{buildroot}%{_sysconfdir}/sysconfig/corosync
    %{buildroot}%{_sysconfdir}/sysconfig/corosync
 
 
 %clean
 %clean
-rm -rf %{buildroot}
 
 
 %description
 %description
 This package contains the Corosync Cluster Engine Executive, several default
 This package contains the Corosync Cluster Engine Executive, several default
@@ -160,11 +151,10 @@ fi
 
 
 %postun
 %postun
 %if %{with systemd} && 0%{?systemd_postun:1}
 %if %{with systemd} && 0%{?systemd_postun:1}
-%systemd_postun
+%systemd_postun corosync.service
 %endif
 %endif
 
 
 %files
 %files
-%defattr(-,root,root,-)
 %doc LICENSE SECURITY
 %doc LICENSE SECURITY
 %{_sbindir}/corosync
 %{_sbindir}/corosync
 %{_sbindir}/corosync-keygen
 %{_sbindir}/corosync-keygen
@@ -223,7 +213,6 @@ fi
 
 
 %package -n corosync-testagents
 %package -n corosync-testagents
 Summary: The Corosync Cluster Engine Test Agents
 Summary: The Corosync Cluster Engine Test Agents
-Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: %{name} = %{version}-%{release}
 
 
 %description -n corosync-testagents
 %description -n corosync-testagents
@@ -245,13 +234,11 @@ This package contains corosync test agents.
 #
 #
 %package -n corosynclib
 %package -n corosynclib
 Summary: The Corosync Cluster Engine Libraries
 Summary: The Corosync Cluster Engine Libraries
-Group: System Environment/Libraries
 
 
 %description -n corosynclib
 %description -n corosynclib
 This package contains corosync libraries.
 This package contains corosync libraries.
 
 
 %files -n corosynclib
 %files -n corosynclib
-%defattr(-,root,root,-)
 %doc LICENSE
 %doc LICENSE
 %{_libdir}/libcfg.so.*
 %{_libdir}/libcfg.so.*
 %{_libdir}/libcpg.so.*
 %{_libdir}/libcpg.so.*
@@ -268,18 +255,15 @@ This package contains corosync libraries.
 
 
 %package -n corosynclib-devel
 %package -n corosynclib-devel
 Summary: The Corosync Cluster Engine Development Kit
 Summary: The Corosync Cluster Engine Development Kit
-Group: Development/Libraries
 Requires: corosynclib%{?_isa} = %{version}-%{release}
 Requires: corosynclib%{?_isa} = %{version}-%{release}
 Requires: pkgconfig
 Requires: pkgconfig
 Provides: corosync-devel = %{version}
 Provides: corosync-devel = %{version}
-Obsoletes: corosync-devel < 0.92-7
 
 
 %description -n corosynclib-devel
 %description -n corosynclib-devel
 This package contains include files and man pages used to develop using
 This package contains include files and man pages used to develop using
 The Corosync Cluster Engine APIs.
 The Corosync Cluster Engine APIs.
 
 
 %files -n corosynclib-devel
 %files -n corosynclib-devel
-%defattr(-,root,root,-)
 %doc LICENSE
 %doc LICENSE
 %dir %{_includedir}/corosync/
 %dir %{_includedir}/corosync/
 %{_includedir}/corosync/corodefs.h
 %{_includedir}/corosync/corodefs.h