%global projectname freemedforms %global releasetarname freemedformsfullsources Name: freemedforms Version: 0.9.0 Release: 0.1.beta1%{?dist} Summary: The freemedforms application suite metapackage License: GPLv3+ and LGPLv2 URL: http://www.%{name}.com Source0: http://freemedforms.googlecode.com/files/%{releasetarname}-%{version}~beta1.tgz Source1: %{name}.1 BuildRequires: qt-devel libXext-devel BuildRequires: desktop-file-utils BuildRequires: quazip-devel BuildRequires: opencv-devel # pull in emr Requires: %{projectname}-emr%{?_isa} >= %{version}-%{release} # pull in freediams Requires: freediams%{?_isa} >= %{version}-%{release} %description FreeMedForms aims to be a open Electronic Medical Record Manager. FreeMedForms is also a lot of derivatives sub-project, which are just standalone compilation of FreeMedForms plugins. This project is a free and open source project. A community grows up around it. FreeMedForms and derivatives is released under the terms of the GPLv3 License. Some parts of the code are LGPL v2.1. FreeMedForms and Derivatives are coded in C++/Qt4.8+. FreeMedForms and Derivatives are available for : - MacOs X - Linux : Ubuntu, Debian, OpenSuse, standalone binary - FreeBSD : need compilation of git repo (please contact author) - Windows This is a meta package that pulls in the EMR and FreeDiams %package emr Summary: The FreeMedForms EMR Requires: %{projectname}-emr-data >= %{version}-%{release} Requires: %{projectname}-common-resources >= %{version}-%{release} Requires: %{projectname}-common-libs%{?_isa} >= %{version}-%{release} Requires: qt-mysql # Obsolete previous packages since we've split into new subpackage scheme Obsoletes: %{name} < 0.5.9-0.7.alpha1 Obsoletes: %{name}-devel < 0.5.9-0.7.alpha1 %description emr The FreeMedForms EMR Please install the freemedforms-emr-docs-en,fr or the freemedforms-common-translations packages if required %package emr-data Summary: Architecture independant data used by the freemedforms EMR BuildArch: noarch %description emr-data This package contains the data packs, images and other architecture independant data used by the freemedforms EMR %package emr-docs-en Summary: English documentation for the freemedforms EMR BuildArch: noarch %description emr-docs-en This package contains HTML documentation in English for the freemedforms EMR %package emr-docs-fr Summary: French documentation for the freemedforms EMR BuildArch: noarch %description emr-docs-fr This package contains HTML documentation in French for the freemedforms EMR %package common-translations Summary: Translation files for the freemedforms EMR BuildArch: noarch %description common-translations This package contains translation files for the freemedforms suite. Languages contained are: English, Frence and Deutsch %package common-libs Summary: Common files utilized by the freemedforms suite Requires: qt-sqlite quazip %description common-libs These are files that are shared between the applications of the freemedforms suite, such as freemedforms, freediams, freeaccount, freeicd, freepad, freetoolbox. All applications of the suite should require this package when they are packaged for Fedora instead of re-generating these files. See the freediams package for hints on how to do this. %package common-resources Summary: Common resources used by the frreemedforms suite BuildArch: noarch Requires: %{projectname}-common-translations >= %{version}-%{release} %description common-resources This package contains textfiles that are shared between the applications of the freemedforms suite such as freemedforms, freediams, freeaccount, freeicd, freepad, freetoolbox All applications of the suite should require this package when they are packaged for Fedora instead of re-generating these files. See the freediams package for hints on how to do this. %prep %setup -q -n %{name}-%{version}~beta1 # Information about libquazip in FreeMedForms. # libquazip code is bundled in the source package but we can # avoid its compilation using the CONFIG+=dontbuildquazip in the qmake commandline # or by editing the buildspecs/optionalfeatures.pri # (uncommenting the '# CONFIG += dontbuildquazip' line) # Information about the build system. # The new build system of the FreeMedForms project (0.8+) creates the # buildpsecs/compiling.pri # during the qmake step. This file differs from apps to apps, so we need # cache it and reuse it before doing any make steps. # You can find a complete guide to the FreeMedForms build process here: # http://freemedforms.com/en/code/buildsystem # For internal libraries you can keep the defined rpath. # correct end of file rpmlint error sed -i 's/\r//' README.txt COPYING.txt %build export PATH=$PATH:/usr/%{_lib}/qt4/bin/ # Create all translations lrelease global_resources/translations/*.ts # Build FreeMedForms EMR pushd freemedforms qmake freemedforms.pro -r \ "CONFIG+=release" "CONFIG-=debug" \ "CONFIG+=LINUX_INTEGRATED" "CONFIG+=dontbuildquazip" \ "LIBRARY_BASENAME=%{_lib}" \ "INSTALL_ROOT_PATH=$RPM_BUILD_ROOT%{_prefix}" #cp ../buildspecs/compiling.pri build/compiling_freemedforms.pri make %{?_smp_mflags} popd %install # Install FreeMedForms EMR pushd freemedforms make install DESTDIR=$RPM_BUILD_ROOT popd # Install man pages 'by-hand' mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ install -p -m 0644 global_resources/package_helpers/freemedforms.1 -t $RPM_BUILD_ROOT/%{_mandir}/man1/ # Change the mod of bins/libs to rwxr-xr-x chmod -v 0755 $RPM_BUILD_ROOT/%{_libdir}/freemedforms-common/*.so* chmod -v 0755 $RPM_BUILD_ROOT/%{_libdir}/freemedforms/*.so* chmod -v 0755 $RPM_BUILD_ROOT/%{_bindir}/freemedforms # Fix up and validate desktop file sed -r -i "s/Categories=Office;MedicalSoftware/Categories=Office;/" ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop sed -r -i "/Version/d" ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop # Remove packagehelpers part rm -fvr $RPM_BUILD_ROOT/%{_datadir}/%{name}/package_helpers/ %files %doc COPYING.txt README.txt %files emr %{_bindir}/%{name} %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.so %{_libdir}/%{name}/*pluginspec %dir %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.svg %{_mandir}/man1/%{name}.* %dir %{_docdir}/%{projectname}-project/%{name}/ %files emr-data %{_datadir}/%{name}/forms/ %{_datadir}/%{name}/profiles/ %files emr-docs-en %{_docdir}/%{projectname}-project/%{name}/en/ %files emr-docs-fr %{_docdir}/%{projectname}-project/%{name}/fr/ %files common-translations %{_datadir}/%{name}/translations/ %files common-libs %dir %{_libdir}/%{projectname}-common %{_libdir}/%{projectname}-common/*so.* %{_libdir}/%{projectname}-common/*so %files common-resources %dir %{_docdir}/%{projectname}-project/ %{_datadir}/%{projectname}/datapacks/ %{_datadir}/%{projectname}/pixmap/ %{_datadir}/%{projectname}/textfiles/ %{_datadir}/%{projectname}/sql/ %changelog * Thu Aug 15 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.9.0-0.1.beta1 - Based on Eric's spec - Update to 0.9.0~beta1 - Update build system 0.9.0 - Adding some comments - Correcting some package content - Rpaths, but internal libraries so OK * Sun May 19 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.8.2.1-1 - Update to 0.8.2.1 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jun 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-6 - Some more reorganizing of files in packages: - the sql, datapacks, pixmaps are common components for the entire suite * Thu Jun 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-5 - Bump spec for ownership changes * Thu Jun 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-4 - Added freediams - Split another subpackage for common-resources - Added projectname macro to use in project common files * Thu Jun 28 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-3 - Try patch upstream suggested - Add obsoletes to maintain upgrade path * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-2 - Split to subpackages to make it easier to install suite applications - Split arch indep packages * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.5-1 - Update to 0.7.5 * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.7.4-1 - Update to 0.7.4 * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.9-0.6.alpha1 - Filter requires! * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.9-0.5.alpha1 - Remove stray requires on -devel package (removed) * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.9-0.4.alpha1 - Filter provides * Wed Jun 27 2012 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.9-0.3.alpha1 - Remove devel package since so files are privately used plug-ins - rhbz#742396 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9-0.2.alpha1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Jun 15 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.9-0.1alpha1 - Let rpath be - Corrections as Eric suggested at https://bugzilla.redhat.com/show_bug.cgi?id=707002#c2 * Sat May 28 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.9-0.1alpha1 - Used chrpath to remove rpath additions - Initial rpm build - Based on the spec used for OpenSUSE maintained by Sascha Manns.