mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 15:59:38 +02:00
made lazarus rpm less dependent from gtk1 devel packages
git-svn-id: trunk@9400 -
This commit is contained in:
parent
edd3fd8bce
commit
9a0d1892b5
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2495,6 +2495,7 @@ tools/install/macosx/makefpcsnapshot.sh svneol=native#text/plain
|
||||
tools/install/macosx/makefpcsrcsnapshot.sh svneol=native#text/plain
|
||||
tools/install/macosx/makelazsnapshot.sh svneol=native#text/plain
|
||||
tools/install/replace_in_files.pl -text svneol=native#application/x-perl
|
||||
tools/install/rpm/create_gtk1_links.sh svneol=native#text/plain
|
||||
tools/install/rpm/create_nonroot_rpmmacros.sh svneol=native#text/plain
|
||||
tools/install/rpm/fpc.spec.template svneol=native#text/plain
|
||||
tools/install/rpm/fpc_crosswin32.spec.template svneol=native#text/plain
|
||||
|
38
tools/install/rpm/create_gtk1_links.sh
Executable file
38
tools/install/rpm/create_gtk1_links.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: create_gtk1_links.sh [buildroot]
|
||||
|
||||
buildroot=$1
|
||||
mainlibpath="/usr/lib"
|
||||
libpaths="$mainlibpath /opt/gnome/lib /usr/local/lib"
|
||||
libs="glib-1.2.so.0 gdk-1.2.so.0 gtk-1.2.so.0 gdk_pixbuf.so.2"
|
||||
|
||||
for lib in $libs; do
|
||||
# create libname without version number
|
||||
ShortLib=$(echo $lib | sed -e 's/\.[0-9]\+$//g' -e 's/-.*.so/.so/g')
|
||||
echo "searching lib$ShortLib ..."
|
||||
# search lib in all paths
|
||||
ShortLibFile=""
|
||||
for Path in $libpaths; do
|
||||
if [ -z "$ShortLibFile" ]; then
|
||||
File="$buildroot$Path/lib$ShortLib"
|
||||
if [ -f $File ]; then
|
||||
ShortLibFile=$File
|
||||
fi
|
||||
fi
|
||||
done
|
||||
#echo "Found: $ShortLibFile"
|
||||
if [ -z "$ShortLibFile" ]; then
|
||||
# not found - search lib with number and create a link
|
||||
for Path in $libpaths; do
|
||||
if [ -z "$ShortLibFile" ]; then
|
||||
File="$buildroot$Path/lib$lib"
|
||||
#echo "trying "$File
|
||||
if [ -f $File ]; then
|
||||
ShortLibFile=$mainlibpath/lib$ShortLib
|
||||
ln -s $Path/lib$lib $ShortLibFile
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
mkdir -p ~/rpm/tmp
|
||||
for fulldir in /usr/src/redhat/*
|
||||
do
|
||||
for fulldir in BUILD RPMS SOURCES SPECS SRPMS; do
|
||||
dir=$(basename "$fulldir")
|
||||
mkdir -p ~/rpm/"$dir"
|
||||
done
|
||||
|
@ -10,7 +10,7 @@ Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}-%{
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
#BuildRequires:
|
||||
Requires: fpc-src = FPCVERSION, fpc = FPCVERSION, gdk-pixbuf-devel, gtk+, gtk+-devel, gdb, glibc-devel, gdk-pixbuf
|
||||
Requires: fpc-src = FPCVERSION, fpc = FPCVERSION, gdk-pixbuf, gtk+, gdb, glibc
|
||||
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
@ -51,6 +51,7 @@ cp -a lazarus/* %{buildroot}%{_libdir}/%{name}/
|
||||
install -m 644 lazarus/install/lazarus.desktop %{buildroot}%{_datadir}/applications/lazarus.desktop
|
||||
ln -sf ../%{_lib}/%{name}/lazarus %{buildroot}%{_bindir}/lazarus
|
||||
ln -sf ../%{_lib}/%{name}/startlazarus %{buildroot}%{_bindir}/startlazarus
|
||||
%{_lib}/%{name}/tools/install/rpm/create_gtk1_links.sh
|
||||
|
||||
%clean
|
||||
[ %{buildroot} != "/" ] && ( rm -rf %{buildroot} )
|
||||
|
Loading…
Reference in New Issue
Block a user