Fix COPR build and remove fedora specific xdg files

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2018-10-31 11:39:27 +00:00
committed by Yorik van Havre
parent b662ee77a7
commit ae9fdfd724
5 changed files with 24 additions and 75 deletions

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">freecad.desktop</id>
<licence>LGPL</licence>
<name>FreeCAD</name>
<summary>An open source parametric 3D CAD modeler</summary>
<description>
<p>FreeCAD is a parametric 3D modeler. Parametric modeling
allows you to easily modify your design by going back into
your model history and changing its parameters. FreeCAD is
open source (LGPL license) and completely modular, allowing
for very advanced extension and customization.</p>
<p>FreeCAD is multiplatfom, and reads and writes many open
file formats such as STEP, IGES, STL and others.</p>
</description>
<screenshots>
<screenshot type="default" width="800" height="600">http://www.freecadweb.org/wiki/index.php?title=File:FreeCAD011.png</screenshot>
</screenshots>
<url type="homepage">http://www.freecadweb.org</url>
<updatecontact>yorik@uncreated.net</updatecontact>
</application>

View File

@@ -1,19 +0,0 @@
[Desktop Entry]
Version=1.0
Name=FreeCAD
Name[de]=FreeCAD
Name[pl]=FreeCAD
Comment=Feature based Parametric Modeler
Comment[de]=Feature-basierter parametrischer Modellierer
GenericName=CAD Application
GenericName[de]=CAD-Anwendung
GenericName[pl]=Aplikacja CAD
Exec=/usr/bin/FreeCAD %F
Path=/usr/@lib@/freecad
Terminal=false
Type=Application
Icon=freecad
Categories=Graphics;Science;Education;Engineering;
StartupNotify=true
GenericName[de_DE]=Feature-basierter parametrischer Modellierer
MimeType=application/x-extension-fcstd;

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-extension-fcstd">
<!-- <sub-class-of type="application/zip"/> -->
<comment>FreeCAD document files</comment>
<glob pattern="*.fcstd"/>
</mime-type>
</mime-info>

View File

@@ -6,9 +6,10 @@
# Some plugins go in the Mod folder instead of lib. Deal with those here:
%global mod_plugins Mod/PartDesign
%define name freecad
%define github_name FreeCAD
%define branch master
Name: %{name}
Name: %{name}
Epoch: 1
Version: 0.18_pre
Release: {{{ git_commits_no }}}
@@ -17,11 +18,7 @@ Group: Applications/Engineering
License: GPLv2+
URL: http://sourceforge.net/apps/mediawiki/free-cad/
Source0: https://github.com/FreeCAD/FreeCAD/archive/%{branch}.tar.gz
Source101: https://raw.github.com/FreeCAD/FreeCAD/%{branch}/package/fedora/%{name}.desktop
Source103: https://raw.github.com/FreeCAD/FreeCAD/%{branch}/package/fedora/%{name}.appdata.xml
Source104: https://raw.github.com/FreeCAD/FreeCAD/%{branch}/package/fedora/%{name}.sharedmimeinfo
Source0: https://github.com/%{github_name}/FreeCAD/archive/%{branch}.tar.gz
# Utilities
# Development Libraries
@@ -174,24 +171,24 @@ ln -s ../%{_lib}/%{name}/bin/FreeCAD .
ln -s ../%{_lib}/%{name}/bin/FreeCADCmd .
popd
# Install desktop file
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE101}
sed -i 's,@lib@,%{_lib},g' %{buildroot}%{_datadir}/applications/%{name}.desktop
mkdir %{buildroot}%{_datadir}/appdata/
mv %{buildroot}%{_libdir}/%{name}/share/metainfo/* %{buildroot}%{_datadir}/appdata/
# Install desktop icon
install -pD -m 0644 ../src/Gui/Icons/%{name}.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
mkdir %{buildroot}%{_datadir}/applications/
mv %{buildroot}%{_libdir}/%{name}/share/applications/* %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
mv %{buildroot}%{_libdir}/%{name}/share/icons/hicolor/scalable/apps/* %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
# Install MimeType file
mkdir -p %{buildroot}%{_datadir}/mime/packages
install -pm 0644 %{SOURCE104} %{buildroot}%{_datadir}/mime/packages/%{name}.xml
mkdir -p %{buildroot}%{_datadir}/mime/packages/
mv %{buildroot}%{_libdir}/%{name}/share/mime/packages/* %{buildroot}%{_datadir}/mime/packages/
# Install appdata file
mkdir -p %{buildroot}%{_datadir}/appdata
install -pm 0644 %{SOURCE103} %{buildroot}%{_datadir}/appdata/
pushd %{buildroot}%{_libdir}/%{name}/share/
rmdir metainfo/
rmdir applications/
rmdir -p mime/packages/
rmdir -p icons/hicolor/scalable/apps/
popd
# Bug maintainers to keep %%{plugins} macro up to date.
#
@@ -217,8 +214,6 @@ for p in %{plugins}; do
fi
done
%check
%{?fedora:appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/appdata/*.appdata.xml}
@@ -238,7 +233,7 @@ fi
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/scalable/apps &>/dev/null || :
%files
@@ -247,15 +242,15 @@ fi
%exclude %{_docdir}/%{name}/%{name}.*
%exclude %{_docdir}/%{name}/ThirdPartyLibraries.html
%{_bindir}/*
%{_datadir}/appdata/*.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/mime/packages/%{name}.xml
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/bin/
%{_libdir}/%{name}/lib/
%{_libdir}/%{name}/Mod/
%{_libdir}/%{name}/Ext/
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/scalable/apps/*
%{_datadir}/appdata/*
%{_datadir}/mime/packages/*
%files data
%{_datadir}/%{name}/

2
package/fedora/rpkg.conf Normal file
View File

@@ -0,0 +1,2 @@
[rpkg]
auto_pack = False