rpm: renamed lazarus to lazarus-project and added conflicts

This commit is contained in:
mattias 2024-10-23 20:08:06 +02:00
parent caac938478
commit a574aec237
2 changed files with 12 additions and 11 deletions

View File

@ -60,13 +60,13 @@ Day=$(date +%d)
# get installed fpc version
echo "getting installed fpc version ..."
FPCRPM=$(rpm -qa | egrep '^fpc-[0-9]')
FPCRPM=$(rpm -qa | egrep '^fpc-laz-[0-9]')
if [ "x$FPCRPM" = "x" ]; then
echo ERROR: fpc rpm not installed
exit
fi
# remove from the fpc version the architecture i386, i686, x86_64
FPCRPMVersion=$(echo $FPCRPM | sed -e 's/fpc-//g' -e 's/\.[a-z0-9_]\+$//g')
FPCRPMVersion=$(echo $FPCRPM | sed -e 's/fpc-laz-//g' -e 's/\.[a-z0-9_]\+$//g')
echo "installed fpc version: $FPCRPMVersion"
FPCSRCRPMVersion=$(echo $FPCRPMVersion | cut -d- -f1)
@ -93,7 +93,7 @@ echo "creating lazarus tgz ..."
# create spec file
echo "creating lazarus spec file ..."
CHMCOMMENT="# "
cat rpm/lazarus.spec.template | \
cat rpm/lazarus-project.spec.template | \
sed -e "s/LAZVERSION/$LazVersion/g" \
-e "s/LAZRELEASE/$LazRelease/g" \
-e "s/LAZSOURCE/$Src/g" \
@ -106,6 +106,6 @@ cat rpm/lazarus.spec.template | \
echo "building rpm ..."
rpm -ba $SpecFile || rpmbuild -ba $SpecFile
echo "The new rpm can be found at $RPMSrcDir/RPMS/$Arch/lazarus-$LazVersion-$LazRelease.$Arch.rpm"
echo "The new rpm can be found at $RPMSrcDir/RPMS/$Arch/lazarus-project-$LazVersion-$LazRelease.$Arch.rpm"
# end.

View File

@ -1,4 +1,4 @@
Name: lazarus
Name: lazarus-project
Version: LAZVERSION
Release: LAZRELEASE
Summary: Lazarus Component Library and IDE
@ -6,12 +6,13 @@ Summary: Lazarus Component Library and IDE
Group: Development/Languages
License: GPL and modified LGPL
URL: http://www.lazarus.freepascal.org/
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}-%{release}.tar.gz
Source0: https://prdownloads.sourceforge.net/lazarus/lazarus-%{version}-%{release}.tar.gz
Packager: Mattias Gaertner
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRoot: %{_tmppath}/lazarus-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: lazarus, lazarus-ide, lazarus-docs, lazarus-lcl, lazarus-lcl-gtk, lazarus-lcl-gtk2, lazarus-lcl-gtk3, lazarus-lcl-nogui, lazarus-lcl-qt, lazarus-lcl-qt5, lazarus-lcl-qt6, lazarus-tools
BuildRequires: fpc = FPCVERSION, gtk2-devel, glibc-devel
Requires: fpc-src = FPCSRCVERSION, fpc = FPCVERSION, gtk2-devel, glibc-devel, binutils, gdb
BuildRequires: fpc-laz = FPCVERSION, gtk2-devel, glibc-devel
Requires: fpc-src-laz = FPCSRCVERSION, fpc-laz = FPCVERSION, gtk2-devel, glibc-devel, binutils, gdb
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
@ -56,7 +57,7 @@ fi
%install
[ %{buildroot} != "/" ] && ( rm -rf %{buildroot} )
LAZARUSDIR=%{_datadir}/%{name}
LAZARUSDIR=%{_datadir}/lazarus
mkdir -p %{buildroot}$LAZARUSDIR
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/pixmaps
@ -89,7 +90,7 @@ update-desktop-database &> /dev/null ||:
%files
%defattr(-,root,root,-)
%{_datadir}/%{name}
%{_datadir}/lazarus
%{_bindir}/*
%{_datadir}/pixmaps/lazarus.png
%{_datadir}/applications/lazarus.desktop