Use '|' instead of '/' as pattern delimiter in sed expression to filter

CFLAGS (Fix FTBFS).
- Modernize spec.
- Add %license.
This commit is contained in:
Ralf Corsépius 2015-06-20 14:43:48 +02:00
parent c03d6beda4
commit 4d55f75bfd
1 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,6 @@
Name: premake
Version: 4.3
Release: 11%{?dist}
Release: 12%{?dist}
Summary: Cross-platform build configuration tool
Group: Development/Tools
@ -11,7 +11,6 @@ Source0: http://downloads.sourceforge.net/%{name}/premake-%{version}-src.
Patch0: premake-4.3-system-lua.patch
# Add the missing manpage
Patch1: premake-4.3-manpage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: compat-lua-devel readline-devel
%description
@ -29,9 +28,9 @@ Premake is a build configuration tool that can generate project files for:
%patch0 -p0
%patch1 -p0
# Inject optflags into CFLAGS
sed -i "s/^\s*CFLAGS\s*+=.*/CFLAGS += \$(CPPFLAGS) %{optflags}/" build/gmake.unix/Premake4.make
sed -i "s|^\s*CFLAGS\s*+=.*|CFLAGS += \$(CPPFLAGS) %{optflags}|" build/gmake.unix/Premake4.make
# Disable stripping the executable
sed -i "s/^\s*LDFLAGS\s*+= -s/LDFLAGS +=/" build/gmake.unix/Premake4.make
sed -i "s|^\s*LDFLAGS\s*+= -s|LDFLAGS +=|" build/gmake.unix/Premake4.make
# Use the release build for running tests
sed -i "s/debug/release/" tests/test
@ -40,22 +39,24 @@ cd build/gmake.unix/
make verbose=true %{?_smp_mflags}
%install
rm -rf %{buildroot}
install -m 755 -Dp ./bin/release/premake4 %{buildroot}/%{_bindir}/premake4
install -m 644 -Dp ./premake4.1 %{buildroot}/%{_mandir}/man1/premake4.1
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/premake4
%{_mandir}/man1/premake4.1*
%doc LICENSE.txt README.txt CHANGES.txt
%doc README.txt CHANGES.txt
%license LICENSE.txt
%changelog
* Sat Jun 20 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 4.3-12
- Use '|' instead of '/' as pattern delimiter in sed expression to filter
CFLAGS (Fix FTBFS).
- Modernize spec.
- Add %%license.
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild