Fix for rpm packages.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-03-26 10:01:56 +02:00
parent ec066cce5c
commit 20b974a802

View File

@ -1,5 +1,9 @@
Name:valentina Name:valentina
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: ccache
# Fedora specifics # Fedora specifics
%if 0%{?fedora_version} > 0 || 0%{?rhel_version} > 0 || 0%{?centos_version} > 0 %if 0%{?fedora_version} > 0 || 0%{?rhel_version} > 0 || 0%{?centos_version} > 0
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
@ -11,7 +15,6 @@ BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: qt5-qtxmlpatterns-devel >= 5.2.0 BuildRequires: qt5-qtxmlpatterns-devel >= 5.2.0
BuildRequires: qt5-qtsvg-devel >= 5.2.0 BuildRequires: qt5-qtsvg-devel >= 5.2.0
BuildRequires: qt5-qttools-devel >= 5.2.0 BuildRequires: qt5-qttools-devel >= 5.2.0
BuildRequires: ccache
%endif %endif
# SUSE Specifics # SUSE Specifics
@ -21,7 +24,6 @@ BuildRequires: libqt5-qttools
BuildRequires: libQt5Svg-devel BuildRequires: libQt5Svg-devel
BuildRequires: libqt5-qtxmlpatterns-devel BuildRequires: libqt5-qtxmlpatterns-devel
BuildRequires: libqt5-linguist-devel BuildRequires: libqt5-linguist-devel
BuildRequires: ccache
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
%endif %endif
@ -36,6 +38,16 @@ Summary: Pattern Making Application
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Packager: Roman Telezhinskyi <dismine@gmail.com> Packager: Roman Telezhinskyi <dismine@gmail.com>
# Disables debug packages and stripping of binaries:
%global _enable_debug_package 0
%global __debug_install_post %{nil}
%global debug_package %{nil}
%if 0%{?suse_version} >= 1320
%global suse_insert_debug_package %{nil}
%global _suse_insert_debug_package %{nil}
%global _suse_insert_debug_package_seen %{nil}
%endif
%description %description
Valentina is a cross-platform patternmaking program which allows designers Valentina is a cross-platform patternmaking program which allows designers
to create and model patterns of clothing. This software allows pattern to create and model patterns of clothing. This software allows pattern
@ -55,6 +67,7 @@ qmake-qt5 PREFIX=%{buildroot}%{_prefix} Valentina.pro -r
%{__make} %{?jobs:-j %jobs} %{__make} %{?jobs:-j %jobs}
%install %install
export NO_DEBUGINFO_STRIP_DEBUG=true
%{__make} install %{__make} install
gzip -9c dist/debian/%{name}.1 > dist/debian/%{name}.1.gz && gzip -9c dist/debian/%{name}.1 > dist/debian/%{name}.1.gz &&
%{__install} -Dm 644 dist/debian/%{name}.1.gz %{buildroot}%{_mandir}/man1/%{name}.1.gz %{__install} -Dm 644 dist/debian/%{name}.1.gz %{buildroot}%{_mandir}/man1/%{name}.1.gz
@ -63,13 +76,19 @@ gzip -9c dist/debian/%{name}.1 > dist/debian/%{name}.1.gz &&
%suse_update_desktop_file -r %{name} VectorGraphics %suse_update_desktop_file -r %{name} VectorGraphics
%endif %endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README.txt LICENSE_GPL.txt %doc README.txt LICENSE_GPL.txt
%doc %{_mandir}/man1/%{name}.1.gz %doc %{_mandir}/man1/%{name}.1.gz
%{_bindir}/* %{_bindir}/valentina
%{_libdir}/* %{_libdir}/libvpropertyexplorer.so
%{_libdir}/libvpropertyexplorer.so.*
%{_libdir}/libqmuparser.so
%{_libdir}/libqmuparser.so.*
%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/* %{_datadir}/pixmaps/*
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
@ -82,13 +101,7 @@ gzip -9c dist/debian/%{name}.1 > dist/debian/%{name}.1.gz &&
%clean %clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%post
ldconfig
%changelog %changelog
* Mon Dec 22 2014 Roman Telezhinskyi * Mon Dec 22 2014 Roman Telezhinskyi
- Initial build - Initial build