%global commit 8e83ae91e375b8b0b440f8ee687b4315323a1ada %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global demo_workspace_commit b1563c62fa41ae400100aa6f590b29baf60d5f02 %global googletest_commit faeb6521cb4238bcbc38808a10a0580f39adcb44 %global hoedown_commit 3bb87ac7931b5e9e6b8da72f5be7418fd020a43c %global parseagle_commit df70be2f71d9f1de5ed1a275d8a26f6196f63b4a %global quazip_commit faac06e2cf6219b1d3c860962fda458014fc774f %global sexpresso_commit 0f13098167740c5becd0da00bcb1660f1d62d612 %global test_data_commit b9d92dbba19574495020aa0d9765f7e2cf4384fd Name: librepcb # libs/librepcb/common/common.pro:DEFINES += APP_VERSION="\\\"0.1.0\\\"" Version: 0.1.0 Release: 1.20180208git%{shortcommit}%{?dist} Summary: Schematic and Layout Editor to develop printed circuit boards Group: Applications/Engineering License: GPLv3+ URL: https://github.com/LibrePCB/LibrePCB Source0: https://github.com/LibrePCB/LibrePCB/archive/%{commit}/LibrePCB-%{commit}.tar.gz Source1: https://github.com/LibrePCB/demo-workspace/archive/%{demo_workspace_commit}/demo-workspace-%{demo_workspace_commit}.tar.gz Source2: https://github.com/LibrePCB/googletest/archive/%{googletest_commit}/googletest-%{googletest_commit}.tar.gz Source3: https://github.com/LibrePCB/hoedown/archive/%{hoedown_commit}/hoedown-%{hoedown_commit}.tar.gz Source4: https://github.com/LibrePCB/parseagle/archive/%{parseagle_commit}/parseagle-%{parseagle_commit}.tar.gz Source5: https://github.com/LibrePCB/quazip/archive/%{quazip_commit}/quazip-%{quazip_commit}.tar.gz Source6: https://github.com/LibrePCB/sexpresso/archive/%{sexpresso_commit}/sexpresso-%{sexpresso_commit}.tar.gz Source7: https://github.com/LibrePCB/librepcb-test-data/archive/%{test_data_commit}/librepcb-test-data-%{test_data_commit}.tar.gz BuildRequires: pkgconfig(Qt5Core) >= 5.2 BuildRequires: pkgconfig(Qt5Network) >= 5.2 BuildRequires: pkgconfig(Qt5OpenGL) >= 5.2 BuildRequires: pkgconfig(Qt5PrintSupport) >= 5.2 BuildRequires: pkgconfig(Qt5Sql) >= 5.2 BuildRequires: pkgconfig(Qt5Test) >= 5.2 BuildRequires: pkgconfig(Qt5Widgets) >= 5.2 BuildRequires: pkgconfig(Qt5Xml) >= 5.2 BuildRequires: qt5-linguist BuildRequires: mesa-libGLU-devel BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: gcc-c++ BuildRequires: desktop-file-utils %description LibrePCB is an all-in-one solution for PCB design. It includes easy-to-use schematic and board editors. %prep %setup -q -n LibrePCB-%{commit} -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 rm -rf dev/demo-workspace libs/googletest libs/hoedown libs/parseagle \ libs/quazip libs/sexpresso tests/data ln -s ../demo-workspace-%{demo_workspace_commit} dev/demo-workspace ln -s ../googletest-%{googletest_commit} libs/googletest ln -s ../hoedown-%{hoedown_commit} libs/hoedown ln -s ../parseagle-%{parseagle_commit} libs/parseagle ln -s ../quazip-%{quazip_commit} libs/quazip ln -s ../sexpresso-%{sexpresso_commit} libs/sexpresso ln -s ../librepcb-test-data-%{test_data_commit} tests/data sed 's/qztest/#qztest/' -i libs/quazip/quazip.pro sed 's/GIT_VERSION=.*/GIT_VERSION="\\\\\\"%{shortcommit}\\\\\\""/' -i libs/librepcb/common/common.pro sed 's/\$\${DESTDIR}\/libhoedown.a/..\/..\/libs\/hoedown\/libhoedown.a/' -i apps/librepcb/librepcb.pro sed 's/\$\${DESTDIR}\/libquazip.a/..\/..\/libs\/quazip\/quazip\/libquazip.a/' -i apps/librepcb/librepcb.pro sed 's/LIBS +=/LIBS += -L..\/..\/libs\/quazip\/quazip\/ -L..\/..\/libs\/hoedown/' -i apps/librepcb/librepcb.pro sed 's/\$\${DESTDIR}\/libgoogletest.a/..\/libs\/googletest\/libgoogletest.a/' -i tests/tests.pro sed 's/\$\${DESTDIR}\/libquazip.a/..\/libs\/quazip\/quazip\/libquazip.a/' -i tests/tests.pro sed 's/\$\${DESTDIR}\/libsexpresso.a/..\/libs\/sexpresso\/libsexpresso.a/' -i tests/tests.pro sed 's/\$\${DESTDIR}\/libsexpresso.a/..\/..\/libs\/sexpresso\/libsexpresso.a/' -i \ apps/librepcb/librepcb.pro \ apps/ProjectLibraryUpdater/ProjectLibraryUpdater.pro \ apps/EagleImport/EagleImport.pro \ apps/WorkspaceLibraryUpdater/WorkspaceLibraryUpdater.pro sed 's/\$\${DESTDIR}\/libparseagle.a/..\/..\/libs\/parseagle\/libparseagle.a/' -i \ apps/EagleImport/EagleImport.pro sed 's/LIBS +=/LIBS += -L..\/libs\/quazip\/quazip\/ -L..\/libs\/parseagle\/ -L..\/libs\/googletest\/ -L..\/libs\/sexpresso\//' -i tests/tests.pro sed 's/LIBS +=/LIBS += -L..\/..\/libs\/quazip\/quazip\/ -L..\/..\/libs\/sexpresso\//' -i apps/librepcb/librepcb.pro sed 's/LIBS +=/LIBS += -L..\/..\/libs\/parseagle\/ -L..\/..\/libs\/sexpresso\//' -i apps/EagleImport/EagleImport.pro sed 's/LIBS +=/LIBS += -L..\/..\/libs\/sexpresso\//' -i \ apps/ProjectLibraryUpdater/ProjectLibraryUpdater.pro \ apps/WorkspaceLibraryUpdater/WorkspaceLibraryUpdater.pro %build %{qmake_qt5} PREFIX=%{_prefix} -r librepcb.pro make %{_smp_mflags} %install make install INSTALL_ROOT=%{buildroot} cp -p share/librepcb/.librepcb-resources %{buildroot}%{_datadir}/librepcb/ desktop-file-validate %{buildroot}%{_datadir}/applications/librepcb.desktop %files %{_bindir}/librepcb %{_datadir}/applications/librepcb.desktop %{_datadir}/mime/packages %{_datadir}/mimelnk %{_datadir}/pixmaps/librepcb.svg %{_datadir}/pixmaps/application-x-librepcb-file.svg %{_datadir}/pixmaps/application-x-librepcb-project.svg %{_datadir}/librepcb %changelog * Sat Feb 10 2018 Lubomir Rintel - 0.1.0-1.20180208git8e83ae9 - Update * Thu Dec 29 2016 Lubomir Rintel - 0.1.0-1.20161229git2ddd110 - Initial packaging