Mageia Bugzilla – Attachment 14578 Details for
Bug 33334
consider upgrading lazarus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
lazarus spec file
lazarus.spec (text/plain), 16.23 KB, created by
Aurelian R
on 2024-06-26 22:53:37 CEST
(
hide
)
Description:
lazarus spec file
Filename:
MIME Type:
Creator:
Aurelian R
Created:
2024-06-26 22:53:37 CEST
Size:
16.23 KB
patch
obsolete
>%define qt5pas_sover 1 >%define libqt5pas %mklibname qt5pas %{qt5pas_sover} >%define libqt5pas_dev %mklibname qt5pas -d >%define qt6pas_sover 6 >%define libqt6pas %mklibname qt6pas %{qt6pas_sover} >%define libqt6pas_dev %mklibname qt6pas -d > >%define lazarus_version 3.4 ># Should be dropped for Mageia and use lazarus version only! ># From: lazarus/lcl/interfaces/qt5/cbindings/Qt5Pas.pro >%define qt5pas_ver 2.15.%{name}%{lazarus_version} ># From: lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro >%define qt6pas_ver 6.2.8.%{name}%{lazarus_version} > >Name: lazarus >Version: %{lazarus_version} >Release: %mkrel 0.1 ># Please note that the LGPL is modified and this is not multi-licensed, but each component has a separate license chosen. >Summary: FreePascal RAD IDE and Component Library >License: GPL-2.0-only AND LGPL-2.0-only AND MPL-1.1 >Group: Development/Languages/Other >URL: http://www.lazarus.freepascal.org/ >Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}-0.tar.gz ># PATCH-FEATURE-UPSTREAM http://mantis.freepascal.org/view.php?id=31364 >Source1: https://raw.githubusercontent.com/hughsie/fedora-appstream/developerapps/appdata-extra/desktop/lazarus.appdata.xml ># PATCH-FIX-OPENSUSE lazarus-Makefile_patch.diff -- Change installation path from /usr/share/lazarus to /usr/lib(64)/lazarus >#https://build.opensuse.org/projects/openSUSE:Factory/packages/lazarus/files/lazarus-Makefile_patch.diff?expand=1 >#Patch0: lazarus-Makefile_patch.diff > >BuildRequires: fpc >= 3.0.0 >BuildRequires: fpc-src >= 3.0.0 > >BuildRequires: binutils >BuildRequires: desktop-file-utils >BuildRequires: hicolor-icon-theme >BuildRequires: pkgconfig(appstream-glib) >BuildRequires: pkgconfig(glib-2.0) >BuildRequires: pkgconfig(gtk+-2.0) > >BuildRequires: qtbase5-common-devel >= 5.6.0 >BuildRequires: pkgconfig(Qt5Network) >BuildRequires: pkgconfig(Qt5PrintSupport) >BuildRequires: pkgconfig(Qt5Widgets) >BuildRequires: pkgconfig(Qt5X11Extras) > >BuildRequires: qtbase6-common-devel >= 6.2.0 >BuildRequires: pkgconfig(Qt6Network) >BuildRequires: pkgconfig(Qt6PrintSupport) >BuildRequires: pkgconfig(Qt6Widgets) > >Requires: binutils >Requires: fpc >Requires: fpc-src >Requires: gcc >Requires: gdb > >Requires: %{name}-ide = %{version} >Requires: %{name}-lcl = %{version} >Requires: %{name}-lcl-gtk2 = %{version} >Requires: %{name}-lcl-nogui = %{version} >Requires: %{name}-tools = %{version} >Requires: pkgconfig(glib-2.0) >Requires: pkgconfig(gtk+-2.0) > ># For smooth upgrade >Obsoletes: lazarus <= 2.2.6.1 > >%description >Lazarus is an IDE to create (graphical and console) applications with >Free Pascal, the (L)GPLed Pascal and Object Pascal compiler that runs on >Windows, Linux, Mac OS X, FreeBSD and more. > >Lazarus is the missing part of the puzzle that will allow you to develop >programs for all of the above platforms in a Delphi-like environment. >The IDE is a RAD tool that includes a form designer. > >Unlike Java's "write once, run anywhere" motto, Lazarus and Free Pascal >strive for "write once, compile anywhere". Since the exact same compiler >is available on all of the above platforms you don't need to do any recoding >to produce identical products for different platforms. > >In short, Lazarus is a free RAD tool for Free Pascal using its >Lazarus Component Library (LCL). > >%package ide >Summary: Lazarus RAD IDE for Free Pascal >License: GPL-2.0-or-later AND LGPL-2.0-only WITH Classpath-exception-2.0 >Requires: %{name}-lcl = %{version} >Requires: %{name}-tools = %{version} >Recommends: %{name}-doc = %{version} >Recommends: %{name}-lcl-nogui = %{version} >Recommends: %{name}-lcl-gtk2 = %{version} >Requires: fpc-src >Requires: gdb >Requires: hicolor-icon-theme >Requires: make > >%description ide >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package provides the Lazarus RAD IDE. > >%package tools >Summary: Lazarus IDE helper programs >License: GPL-2.0-or-later >Requires: binutils >Requires: fpc >Requires: glibc-devel >Requires: %{name}-lcl = %{version} > >%description tools >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package provides helper programs used for building Lazarus projects. > >%package doc >Summary: Lazarus IDE documentation >License: GPL-2.0-or-later > >%description doc >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains documentation and example programs for the Lazarus IDE. > >%package lcl >Summary: Lazarus Component Library >Recommends: %{name}-lcl-gtk2 = %{version} >Recommends: %{name}-lcl-nogui = %{version} > >%description lcl >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains the common parts of the Lazarus Component Library. > >%package lcl-nogui >Summary: Lazarus Component Library - non-graphical components >Requires: %{name}-lcl = %{version} > >%description lcl-nogui >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains LCL components for developing non-graphical applications >and command-line tools. > >%package lcl-gtk2 >Summary: Lazarus Component Library - GTK2 widgetset support >Requires: %{name}-lcl = %{version} >Requires: gtk2-devel > >%description lcl-gtk2 >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains LCL components for developing applications >using the GTK2 widgetset. > >%package lcl-gtk3 >Summary: Lazarus Component Library - GTK2 widgetset support >Requires: %{name}-lcl = %{version} >Requires: gtk3-devel >= 3.24.24 > >%description lcl-gtk3 >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains LCL components for developing applications >using the GTK3 widgetset. > >%package lcl-qt5 >Summary: Lazarus Component Library - Qt5 widgetset support >Requires: %{name}-lcl = %{version} >Requires: %{libqt5pas_dev} = %{qt5pas_ver} > >%description lcl-qt5 >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains LCL components for developing applications >using the Qt5 widgetset. > >%package lcl-qt6 >Summary: Lazarus Component Library - Qt6 widgetset support >Requires: %{name}-lcl = %{version} >Requires: %{libqt6pas_dev} = %{qt6pas_ver} > >%description lcl-qt6 >Lazarus is a cross-platform IDE and component library for Free Pascal. >This package contains LCL components for developing applications >using the Qt6 widgetset. > >%package -n %{libqt5pas} >Version: %{qt5pas_ver} >Summary: Free Pascal interface to Qt5 >License: LGPL-3.0-only >Group: System/Libraries >Provides: qt5pas = %{qt5pas_ver} > >%description -n %{libqt5pas} >Qt5 bindings for Pascal from Lazarus. > >%package -n %{libqt5pas_dev} >Version: %{qt5pas_ver} >Summary: Free Pascal interface to Qt5 >License: LGPL-3.0-only >Group: Development/Libraries/Other >Provides: qt5pas-devel = %{qt5pas_ver} >Requires: %{libqt5pas} = %{qt5pas_ver} > >%description -n %{libqt5pas_dev} >The qt5pas-devel package contains libraries and header files for >developing applications that use qt5pas. > >%package -n %{libqt6pas} >Version: %{qt6pas_ver} >Summary: Free Pascal interface to Qt6 >License: LGPL-3.0-only >Group: System/Libraries >Provides: qt6pas = %{qt6pas_ver} > >%description -n %{libqt6pas} >Qt5 bindings for Pascal from Lazarus. > >%package -n %{libqt6pas_dev} >Version: %{qt6pas_ver} >Summary: Free Pascal interface to Qt6 >License: LGPL-3.0-only >Group: Development/Libraries/Other >Provides: qt6pas-devel = %{qt6pas_ver} >Requires: %{libqt6pas} = %{qt6pas_ver} > >%description -n %{libqt6pas_dev} >The qt6pas-devel package contains libraries and header files for >developing applications that use qt5pas. > ># Instruct fpmake to build in parallel >%global fpmakeopt %{?_smp_build_ncpus:FPMAKEOPT='-T %{_smp_build_ncpus}'} > ># Preferred compilation options - enable GDB debuginfo in DWARF format, plus some optimisations >%global fpcopt -g -gl -gw -O3 > >%prep >%autosetup -p1 -n %{name} > ># Change installation path from /usr/share/lazarus to /usr/lib(64)/lazarus >sed -i -e "s|share\/lazarus|%{_lib}\/lazarus|g" Makefile.fpc ># Add/define desktop menu >sed -i -e "s/Categories=.*/Categories=Development;IDE;/" install/lazarus.desktop >sed -i -e '2 a GenericName=Integrated Development Environment' install/lazarus.desktop > ># remove unneeded files >rm -rf tools/install/cross_unix/debian_crosswin32/ >rm -f tools/install/cross_unix/*deb.* >rm -rf tools/install/debian_* >rm -rf tools/install/freebsd_* >rm -rf tools/install/macosx/ >rm -rf tools/install/slacktgz/ >rm -rf tools/install/win/ >rm -f tools/install/*slacktgz.* > ># fix shebang >find . \( -name "*.sh" -o -name "*.pl" \) -exec sed -i '1s|#!%{_bindir}/env |#!%{_bindir}/|' {} + > ># set executable bit to fix rpmlint error "non-executable-script" >chmod +x components/datetimectrls/docs/clean-files.sh >chmod +x components/datetimectrls/docs/make-archive.sh >chmod +x components/datetimectrls/docs/make-docs.sh >chmod +x components/lazcontrols/docs/make-docs.sh >chmod +x components/rtticontrols/fpdoc/clean-files.sh >chmod +x components/rtticontrols/fpdoc/make-docs.sh > ># remove git ignore files to prevent them from being installed to fix rpmlint error "version-control-internal-file" >find . \( -name ".gitignore" \) -delete > >%build ># Remove the files for building other packages >rm -rf debian >pushd tools >find install -depth -type d ! \( -path "install/linux/*" -o -path "install/linux" -o -path "install" \) -exec rm -rf '{}' \; >popd > ># Re-create the Makefiles >export FPCDIR=%{_datadir}/fpcsrc/ >fpcmake -Tall >pushd components >fpcmake -Tall >popd > ># Compile some basic targets required by everything else >make registration %{fpmakeopt} OPT='%{fpcopt}' > ># Compile lazbuild - required to build other targets >make lazbuild %{fpmakeopt} OPT='%{fpcopt}' > ># Compile LCL base (Lazarus Component Library) for the "nogui" widgetset >make lcl %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM=nogui > ># Compile extra tools >make tools %{fpmakeopt} OPT='%{fpcopt}' > ># Compile the LCL base + extra components for GUI widgetsets >for WIDGETSET in gtk2 gtk3 qt5 qt6; do > make lcl basecomponents bigidecomponents %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM="${WIDGETSET}" >done > ># Compile the IDE itself. Default to using the gkt2 widget set. >make bigide %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM=gtk2 > ># Build libQt5Pas >pushd lcl/interfaces/qt5/cbindings > %{qmake_qt5} > %make_build >popd > ># Build libQt6Pas >pushd lcl/interfaces/qt6/cbindings > %{qmake_qt6} > %make_build >popd > >%install >make install INSTALL_PREFIX=%{buildroot}%{_prefix} _LIB=%{_lib} > ># Remove man page for an executable that is not actually installed. >rm %{buildroot}%{_mandir}/man1/svn2revisioninc.1* || true > >desktop-file-install --dir %{buildroot}%{_datadir}/applications install/%{name}.desktop > >install -d %{buildroot}%{_sysconfdir}/lazarus >sed 's#__LAZARUSDIR__#%{_libdir}/%{name}#;s#__FPCSRCDIR__#%{_datadir}/fpcsrc#' \ > tools/install/linux/environmentoptions.xml \ > > %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml > >chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazreport/tools/localize.sh > >install -Dpm 0644 %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.appdata.xml > >pushd lcl/interfaces/qt5/cbindings > %make_install INSTALL_ROOT=%{buildroot} >popd > >pushd lcl/interfaces/qt6/cbindings > %make_install INSTALL_ROOT=%{buildroot} >popd > ># Since we provide Qt?Pas as a standalone package, remove the .so files bundled in Lazarus dir ># and replace them with symlinks to the standalone .so. >for QTVER in 5 6; do > pushd "./lcl/interfaces/qt${QTVER}/cbindings/" > %make_install INSTALL_ROOT=%{buildroot} > popd > > for FILEPATH in "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/libQt${QTVER}Pas.so"* ; do > FILENAME="$(basename "${FILEPATH}")" > ln -sf "%{_libdir}/${FILENAME}" "${FILEPATH}" > done > > # Cannot be done earlier since "make install" expects the tmp/ directory to be present. Sigh. > rm -rf "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/tmp/" > rm -rf "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/.qmake.stash" >done > >%check >appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml > >%files ># No files, but we want to build the "lazarus" metapackage > >%files doc >%dir %{_libdir}/%{name} >%{_libdir}/%{name}/docs >%{_libdir}/%{name}/examples >%license COPYING.GPL.txt > >%files tools >%dir %{_libdir}/%{name} >%{_libdir}/%{name}/lazbuild >%{_libdir}/%{name}/packager/ >%{_libdir}/%{name}/tools/ >%dir %{_libdir}/%{name}/ide/ >%dir %{_libdir}/%{name}/ide/packages/ >%{_libdir}/%{name}/ide/packages/ideconfig >%{_libdir}/%{name}/ide/packages/idedebugger > >%{_bindir}/lazbuild >%{_bindir}/lazres >%{_bindir}/lrstolfm >%{_bindir}/updatepofiles >%dir %{_sysconfdir}/lazarus >%config(noreplace) %{_sysconfdir}/lazarus/environmentoptions.xml >%license COPYING.GPL.txt >%{_mandir}/man1/lazbuild.1* >%{_mandir}/man1/lazres.1* >%{_mandir}/man1/lrstolfm.1* >%{_mandir}/man1/updatepofiles.1* > >%files ide >%{_libdir}/%{name} ># Exclude -docs files >%exclude %{_libdir}/%{name}/docs >%exclude %{_libdir}/%{name}/examples ># Exclude -lcl files >%exclude %{_libdir}/%{name}/components >%exclude %{_libdir}/%{name}/lcl ># Exclude -tools files >%exclude %{_libdir}/%{name}/lazbuild >%exclude %{_libdir}/%{name}/packager >%exclude %{_libdir}/%{name}/tools ># From Fedora ># Exclude some files that belong in the ide/ directory ># but are actually required by lazbuild to run properly. >%exclude %{_libdir}/%{name}/ide/packages/ideconfig >%exclude %{_libdir}/%{name}/ide/packages/idedebugger > >%{_bindir}/lazarus-ide >%{_bindir}/startlazarus >%{_datadir}/pixmaps/lazarus.png >%{_datadir}/applications/*%{name}.desktop >%{_datadir}/mime/packages/lazarus.xml >%{_datadir}/icons/hicolor/48x48/mimetypes/* >%{_metainfodir}/%{name}.appdata.xml > >%doc README.md >%license COPYING.txt >%license COPYING.LGPL.txt >%license COPYING.modifiedLGPL.txt >%{_mandir}/man1/lazarus-ide.1* >%{_mandir}/man1/startlazarus.1* > ># Helper macro to reduce repetitions (lcl, basecomponents) >%define lcl_base_files(n:) %{expand: > %{*} %{_libdir}/%{name}/components/*/lib/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/units/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/lcl/interfaces/%{-n*}/ > %{*} %{_libdir}/%{name}/lcl/units/*/%{-n*}/ >} > ># Some files are not present for nogui (bigidecomponents) >%define lcl_extra_files(n:) %{expand: > %{*} %{_libdir}/%{name}/components/*/design/lib/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/design/units/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/include/%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/include/intf/%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/lib/*-linux-%{-n*}/ > %{*} %{_libdir}/%{name}/components/*/units/%{-n*}/ > > %{*} %{_libdir}/%{name}/components/chmhelp/packages/help/lib/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/chmhelp/packages/idehelp/lib/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/fpcunit/ide/lib/*-linux/%{-n*}/ > %{*} %{_libdir}/%{name}/components/jcf2/IdePlugin/lazarus/lib/*-linux/%{-n*}/ >} > >%files lcl >%license COPYING.txt >%license COPYING.LGPL.txt >%license COPYING.modifiedLGPL.txt >%license %{_libdir}/%{name}/lcl/interfaces/customdrawn/android/ApacheLicense2.0.txt >%dir %{_libdir}/%{name} >%{_libdir}/%{name}/components/ >%{_libdir}/%{name}/lcl/ >%lcl_base_files -n nogui %exclude >%lcl_base_files -n gtk2 %exclude >%lcl_extra_files -n gtk2 %exclude >%lcl_base_files -n gtk3 %exclude >%lcl_extra_files -n gtk3 %exclude >%lcl_base_files -n qt5 %exclude >%lcl_extra_files -n qt5 %exclude >%lcl_base_files -n qt6 %exclude >%lcl_extra_files -n qt6 %exclude > >%files lcl-nogui >%lcl_base_files -n nogui > >%files lcl-gtk2 >%lcl_base_files -n gtk2 >%lcl_extra_files -n gtk2 > >%files lcl-gtk3 >%lcl_base_files -n gtk3 >%lcl_extra_files -n gtk3 > >%files lcl-qt5 >%lcl_base_files -n qt5 >%lcl_extra_files -n qt5 > >%files lcl-qt6 >%lcl_base_files -n qt6 >%lcl_extra_files -n qt6 > >%files -n %{libqt5pas} >%license lcl/interfaces/qt5/cbindings/COPYING.TXT >%doc lcl/interfaces/qt5/cbindings/README.TXT >%{_libdir}/libQt5Pas.so.* > >%files -n %{libqt5pas_dev} >%{_libdir}/libQt5Pas.so > >%files -n %{libqt6pas} >%license lcl/interfaces/qt6/cbindings/COPYING.TXT >%doc lcl/interfaces/qt6/cbindings/README.TXT >%{_libdir}/libQt6Pas.so.* > >%files -n %{libqt6pas_dev} >%{_libdir}/libQt6Pas.so
%define qt5pas_sover 1 %define libqt5pas %mklibname qt5pas %{qt5pas_sover} %define libqt5pas_dev %mklibname qt5pas -d %define qt6pas_sover 6 %define libqt6pas %mklibname qt6pas %{qt6pas_sover} %define libqt6pas_dev %mklibname qt6pas -d %define lazarus_version 3.4 # Should be dropped for Mageia and use lazarus version only! # From: lazarus/lcl/interfaces/qt5/cbindings/Qt5Pas.pro %define qt5pas_ver 2.15.%{name}%{lazarus_version} # From: lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro %define qt6pas_ver 6.2.8.%{name}%{lazarus_version} Name: lazarus Version: %{lazarus_version} Release: %mkrel 0.1 # Please note that the LGPL is modified and this is not multi-licensed, but each component has a separate license chosen. Summary: FreePascal RAD IDE and Component Library License: GPL-2.0-only AND LGPL-2.0-only AND MPL-1.1 Group: Development/Languages/Other URL: http://www.lazarus.freepascal.org/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}-0.tar.gz # PATCH-FEATURE-UPSTREAM http://mantis.freepascal.org/view.php?id=31364 Source1: https://raw.githubusercontent.com/hughsie/fedora-appstream/developerapps/appdata-extra/desktop/lazarus.appdata.xml # PATCH-FIX-OPENSUSE lazarus-Makefile_patch.diff -- Change installation path from /usr/share/lazarus to /usr/lib(64)/lazarus #https://build.opensuse.org/projects/openSUSE:Factory/packages/lazarus/files/lazarus-Makefile_patch.diff?expand=1 #Patch0: lazarus-Makefile_patch.diff BuildRequires: fpc >= 3.0.0 BuildRequires: fpc-src >= 3.0.0 BuildRequires: binutils BuildRequires: desktop-file-utils BuildRequires: hicolor-icon-theme BuildRequires: pkgconfig(appstream-glib) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: qtbase5-common-devel >= 5.6.0 BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5X11Extras) BuildRequires: qtbase6-common-devel >= 6.2.0 BuildRequires: pkgconfig(Qt6Network) BuildRequires: pkgconfig(Qt6PrintSupport) BuildRequires: pkgconfig(Qt6Widgets) Requires: binutils Requires: fpc Requires: fpc-src Requires: gcc Requires: gdb Requires: %{name}-ide = %{version} Requires: %{name}-lcl = %{version} Requires: %{name}-lcl-gtk2 = %{version} Requires: %{name}-lcl-nogui = %{version} Requires: %{name}-tools = %{version} Requires: pkgconfig(glib-2.0) Requires: pkgconfig(gtk+-2.0) # For smooth upgrade Obsoletes: lazarus <= 2.2.6.1 %description Lazarus is an IDE to create (graphical and console) applications with Free Pascal, the (L)GPLed Pascal and Object Pascal compiler that runs on Windows, Linux, Mac OS X, FreeBSD and more. Lazarus is the missing part of the puzzle that will allow you to develop programs for all of the above platforms in a Delphi-like environment. The IDE is a RAD tool that includes a form designer. Unlike Java's "write once, run anywhere" motto, Lazarus and Free Pascal strive for "write once, compile anywhere". Since the exact same compiler is available on all of the above platforms you don't need to do any recoding to produce identical products for different platforms. In short, Lazarus is a free RAD tool for Free Pascal using its Lazarus Component Library (LCL). %package ide Summary: Lazarus RAD IDE for Free Pascal License: GPL-2.0-or-later AND LGPL-2.0-only WITH Classpath-exception-2.0 Requires: %{name}-lcl = %{version} Requires: %{name}-tools = %{version} Recommends: %{name}-doc = %{version} Recommends: %{name}-lcl-nogui = %{version} Recommends: %{name}-lcl-gtk2 = %{version} Requires: fpc-src Requires: gdb Requires: hicolor-icon-theme Requires: make %description ide Lazarus is a cross-platform IDE and component library for Free Pascal. This package provides the Lazarus RAD IDE. %package tools Summary: Lazarus IDE helper programs License: GPL-2.0-or-later Requires: binutils Requires: fpc Requires: glibc-devel Requires: %{name}-lcl = %{version} %description tools Lazarus is a cross-platform IDE and component library for Free Pascal. This package provides helper programs used for building Lazarus projects. %package doc Summary: Lazarus IDE documentation License: GPL-2.0-or-later %description doc Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains documentation and example programs for the Lazarus IDE. %package lcl Summary: Lazarus Component Library Recommends: %{name}-lcl-gtk2 = %{version} Recommends: %{name}-lcl-nogui = %{version} %description lcl Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains the common parts of the Lazarus Component Library. %package lcl-nogui Summary: Lazarus Component Library - non-graphical components Requires: %{name}-lcl = %{version} %description lcl-nogui Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains LCL components for developing non-graphical applications and command-line tools. %package lcl-gtk2 Summary: Lazarus Component Library - GTK2 widgetset support Requires: %{name}-lcl = %{version} Requires: gtk2-devel %description lcl-gtk2 Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains LCL components for developing applications using the GTK2 widgetset. %package lcl-gtk3 Summary: Lazarus Component Library - GTK2 widgetset support Requires: %{name}-lcl = %{version} Requires: gtk3-devel >= 3.24.24 %description lcl-gtk3 Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains LCL components for developing applications using the GTK3 widgetset. %package lcl-qt5 Summary: Lazarus Component Library - Qt5 widgetset support Requires: %{name}-lcl = %{version} Requires: %{libqt5pas_dev} = %{qt5pas_ver} %description lcl-qt5 Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains LCL components for developing applications using the Qt5 widgetset. %package lcl-qt6 Summary: Lazarus Component Library - Qt6 widgetset support Requires: %{name}-lcl = %{version} Requires: %{libqt6pas_dev} = %{qt6pas_ver} %description lcl-qt6 Lazarus is a cross-platform IDE and component library for Free Pascal. This package contains LCL components for developing applications using the Qt6 widgetset. %package -n %{libqt5pas} Version: %{qt5pas_ver} Summary: Free Pascal interface to Qt5 License: LGPL-3.0-only Group: System/Libraries Provides: qt5pas = %{qt5pas_ver} %description -n %{libqt5pas} Qt5 bindings for Pascal from Lazarus. %package -n %{libqt5pas_dev} Version: %{qt5pas_ver} Summary: Free Pascal interface to Qt5 License: LGPL-3.0-only Group: Development/Libraries/Other Provides: qt5pas-devel = %{qt5pas_ver} Requires: %{libqt5pas} = %{qt5pas_ver} %description -n %{libqt5pas_dev} The qt5pas-devel package contains libraries and header files for developing applications that use qt5pas. %package -n %{libqt6pas} Version: %{qt6pas_ver} Summary: Free Pascal interface to Qt6 License: LGPL-3.0-only Group: System/Libraries Provides: qt6pas = %{qt6pas_ver} %description -n %{libqt6pas} Qt5 bindings for Pascal from Lazarus. %package -n %{libqt6pas_dev} Version: %{qt6pas_ver} Summary: Free Pascal interface to Qt6 License: LGPL-3.0-only Group: Development/Libraries/Other Provides: qt6pas-devel = %{qt6pas_ver} Requires: %{libqt6pas} = %{qt6pas_ver} %description -n %{libqt6pas_dev} The qt6pas-devel package contains libraries and header files for developing applications that use qt5pas. # Instruct fpmake to build in parallel %global fpmakeopt %{?_smp_build_ncpus:FPMAKEOPT='-T %{_smp_build_ncpus}'} # Preferred compilation options - enable GDB debuginfo in DWARF format, plus some optimisations %global fpcopt -g -gl -gw -O3 %prep %autosetup -p1 -n %{name} # Change installation path from /usr/share/lazarus to /usr/lib(64)/lazarus sed -i -e "s|share\/lazarus|%{_lib}\/lazarus|g" Makefile.fpc # Add/define desktop menu sed -i -e "s/Categories=.*/Categories=Development;IDE;/" install/lazarus.desktop sed -i -e '2 a GenericName=Integrated Development Environment' install/lazarus.desktop # remove unneeded files rm -rf tools/install/cross_unix/debian_crosswin32/ rm -f tools/install/cross_unix/*deb.* rm -rf tools/install/debian_* rm -rf tools/install/freebsd_* rm -rf tools/install/macosx/ rm -rf tools/install/slacktgz/ rm -rf tools/install/win/ rm -f tools/install/*slacktgz.* # fix shebang find . \( -name "*.sh" -o -name "*.pl" \) -exec sed -i '1s|#!%{_bindir}/env |#!%{_bindir}/|' {} + # set executable bit to fix rpmlint error "non-executable-script" chmod +x components/datetimectrls/docs/clean-files.sh chmod +x components/datetimectrls/docs/make-archive.sh chmod +x components/datetimectrls/docs/make-docs.sh chmod +x components/lazcontrols/docs/make-docs.sh chmod +x components/rtticontrols/fpdoc/clean-files.sh chmod +x components/rtticontrols/fpdoc/make-docs.sh # remove git ignore files to prevent them from being installed to fix rpmlint error "version-control-internal-file" find . \( -name ".gitignore" \) -delete %build # Remove the files for building other packages rm -rf debian pushd tools find install -depth -type d ! \( -path "install/linux/*" -o -path "install/linux" -o -path "install" \) -exec rm -rf '{}' \; popd # Re-create the Makefiles export FPCDIR=%{_datadir}/fpcsrc/ fpcmake -Tall pushd components fpcmake -Tall popd # Compile some basic targets required by everything else make registration %{fpmakeopt} OPT='%{fpcopt}' # Compile lazbuild - required to build other targets make lazbuild %{fpmakeopt} OPT='%{fpcopt}' # Compile LCL base (Lazarus Component Library) for the "nogui" widgetset make lcl %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM=nogui # Compile extra tools make tools %{fpmakeopt} OPT='%{fpcopt}' # Compile the LCL base + extra components for GUI widgetsets for WIDGETSET in gtk2 gtk3 qt5 qt6; do make lcl basecomponents bigidecomponents %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM="${WIDGETSET}" done # Compile the IDE itself. Default to using the gkt2 widget set. make bigide %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM=gtk2 # Build libQt5Pas pushd lcl/interfaces/qt5/cbindings %{qmake_qt5} %make_build popd # Build libQt6Pas pushd lcl/interfaces/qt6/cbindings %{qmake_qt6} %make_build popd %install make install INSTALL_PREFIX=%{buildroot}%{_prefix} _LIB=%{_lib} # Remove man page for an executable that is not actually installed. rm %{buildroot}%{_mandir}/man1/svn2revisioninc.1* || true desktop-file-install --dir %{buildroot}%{_datadir}/applications install/%{name}.desktop install -d %{buildroot}%{_sysconfdir}/lazarus sed 's#__LAZARUSDIR__#%{_libdir}/%{name}#;s#__FPCSRCDIR__#%{_datadir}/fpcsrc#' \ tools/install/linux/environmentoptions.xml \ > %{buildroot}%{_sysconfdir}/lazarus/environmentoptions.xml chmod 755 %{buildroot}%{_libdir}/%{name}/components/lazreport/tools/localize.sh install -Dpm 0644 %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.appdata.xml pushd lcl/interfaces/qt5/cbindings %make_install INSTALL_ROOT=%{buildroot} popd pushd lcl/interfaces/qt6/cbindings %make_install INSTALL_ROOT=%{buildroot} popd # Since we provide Qt?Pas as a standalone package, remove the .so files bundled in Lazarus dir # and replace them with symlinks to the standalone .so. for QTVER in 5 6; do pushd "./lcl/interfaces/qt${QTVER}/cbindings/" %make_install INSTALL_ROOT=%{buildroot} popd for FILEPATH in "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/libQt${QTVER}Pas.so"* ; do FILENAME="$(basename "${FILEPATH}")" ln -sf "%{_libdir}/${FILENAME}" "${FILEPATH}" done # Cannot be done earlier since "make install" expects the tmp/ directory to be present. Sigh. rm -rf "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/tmp/" rm -rf "%{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt${QTVER}/cbindings/.qmake.stash" done %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml %files # No files, but we want to build the "lazarus" metapackage %files doc %dir %{_libdir}/%{name} %{_libdir}/%{name}/docs %{_libdir}/%{name}/examples %license COPYING.GPL.txt %files tools %dir %{_libdir}/%{name} %{_libdir}/%{name}/lazbuild %{_libdir}/%{name}/packager/ %{_libdir}/%{name}/tools/ %dir %{_libdir}/%{name}/ide/ %dir %{_libdir}/%{name}/ide/packages/ %{_libdir}/%{name}/ide/packages/ideconfig %{_libdir}/%{name}/ide/packages/idedebugger %{_bindir}/lazbuild %{_bindir}/lazres %{_bindir}/lrstolfm %{_bindir}/updatepofiles %dir %{_sysconfdir}/lazarus %config(noreplace) %{_sysconfdir}/lazarus/environmentoptions.xml %license COPYING.GPL.txt %{_mandir}/man1/lazbuild.1* %{_mandir}/man1/lazres.1* %{_mandir}/man1/lrstolfm.1* %{_mandir}/man1/updatepofiles.1* %files ide %{_libdir}/%{name} # Exclude -docs files %exclude %{_libdir}/%{name}/docs %exclude %{_libdir}/%{name}/examples # Exclude -lcl files %exclude %{_libdir}/%{name}/components %exclude %{_libdir}/%{name}/lcl # Exclude -tools files %exclude %{_libdir}/%{name}/lazbuild %exclude %{_libdir}/%{name}/packager %exclude %{_libdir}/%{name}/tools # From Fedora # Exclude some files that belong in the ide/ directory # but are actually required by lazbuild to run properly. %exclude %{_libdir}/%{name}/ide/packages/ideconfig %exclude %{_libdir}/%{name}/ide/packages/idedebugger %{_bindir}/lazarus-ide %{_bindir}/startlazarus %{_datadir}/pixmaps/lazarus.png %{_datadir}/applications/*%{name}.desktop %{_datadir}/mime/packages/lazarus.xml %{_datadir}/icons/hicolor/48x48/mimetypes/* %{_metainfodir}/%{name}.appdata.xml %doc README.md %license COPYING.txt %license COPYING.LGPL.txt %license COPYING.modifiedLGPL.txt %{_mandir}/man1/lazarus-ide.1* %{_mandir}/man1/startlazarus.1* # Helper macro to reduce repetitions (lcl, basecomponents) %define lcl_base_files(n:) %{expand: %{*} %{_libdir}/%{name}/components/*/lib/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/*/units/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/lcl/interfaces/%{-n*}/ %{*} %{_libdir}/%{name}/lcl/units/*/%{-n*}/ } # Some files are not present for nogui (bigidecomponents) %define lcl_extra_files(n:) %{expand: %{*} %{_libdir}/%{name}/components/*/design/lib/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/*/design/units/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/*/include/%{-n*}/ %{*} %{_libdir}/%{name}/components/*/include/intf/%{-n*}/ %{*} %{_libdir}/%{name}/components/*/lib/*-linux-%{-n*}/ %{*} %{_libdir}/%{name}/components/*/units/%{-n*}/ %{*} %{_libdir}/%{name}/components/chmhelp/packages/help/lib/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/chmhelp/packages/idehelp/lib/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/fpcunit/ide/lib/*-linux/%{-n*}/ %{*} %{_libdir}/%{name}/components/jcf2/IdePlugin/lazarus/lib/*-linux/%{-n*}/ } %files lcl %license COPYING.txt %license COPYING.LGPL.txt %license COPYING.modifiedLGPL.txt %license %{_libdir}/%{name}/lcl/interfaces/customdrawn/android/ApacheLicense2.0.txt %dir %{_libdir}/%{name} %{_libdir}/%{name}/components/ %{_libdir}/%{name}/lcl/ %lcl_base_files -n nogui %exclude %lcl_base_files -n gtk2 %exclude %lcl_extra_files -n gtk2 %exclude %lcl_base_files -n gtk3 %exclude %lcl_extra_files -n gtk3 %exclude %lcl_base_files -n qt5 %exclude %lcl_extra_files -n qt5 %exclude %lcl_base_files -n qt6 %exclude %lcl_extra_files -n qt6 %exclude %files lcl-nogui %lcl_base_files -n nogui %files lcl-gtk2 %lcl_base_files -n gtk2 %lcl_extra_files -n gtk2 %files lcl-gtk3 %lcl_base_files -n gtk3 %lcl_extra_files -n gtk3 %files lcl-qt5 %lcl_base_files -n qt5 %lcl_extra_files -n qt5 %files lcl-qt6 %lcl_base_files -n qt6 %lcl_extra_files -n qt6 %files -n %{libqt5pas} %license lcl/interfaces/qt5/cbindings/COPYING.TXT %doc lcl/interfaces/qt5/cbindings/README.TXT %{_libdir}/libQt5Pas.so.* %files -n %{libqt5pas_dev} %{_libdir}/libQt5Pas.so %files -n %{libqt6pas} %license lcl/interfaces/qt6/cbindings/COPYING.TXT %doc lcl/interfaces/qt6/cbindings/README.TXT %{_libdir}/libQt6Pas.so.* %files -n %{libqt6pas_dev} %{_libdir}/libQt6Pas.so
View Attachment As Raw
Actions:
View
Attachments on
bug 33334
: 14578 |
14582
|
14587