mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-14 04:40:31 +01:00
fixed create fpc rpm
git-svn-id: trunk@2722 -
This commit is contained in:
parent
caa329c29e
commit
9b21e012eb
@ -37,6 +37,7 @@ fi
|
|||||||
Date=20$Year$Month$Day
|
Date=20$Year$Month$Day
|
||||||
LazRelease=laz.$Date
|
LazRelease=laz.$Date
|
||||||
SrcTGZ=fpcsrc-$LazVersion-$LazRelease.tgz
|
SrcTGZ=fpcsrc-$LazVersion-$LazRelease.tgz
|
||||||
|
SrcPatch=fpcsrc-patch
|
||||||
TmpDir=/tmp/fpc$LazVersion
|
TmpDir=/tmp/fpc$LazVersion
|
||||||
SpecFile=$TmpDir/fpc/install/fpc.spec
|
SpecFile=$TmpDir/fpc/install/fpc.spec
|
||||||
|
|
||||||
@ -48,18 +49,21 @@ fi
|
|||||||
# unpack source into temporary directory
|
# unpack source into temporary directory
|
||||||
rm -rf $TmpDir
|
rm -rf $TmpDir
|
||||||
mkdir -p $TmpDir
|
mkdir -p $TmpDir
|
||||||
cp $SrcTGZ $TmpDir/
|
cp $SrcTGZ $SrcPatch $TmpDir/
|
||||||
cd $TmpDir
|
cd $TmpDir
|
||||||
tar xzf $SrcTGZ
|
tar xzf $SrcTGZ
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
# patch sources
|
||||||
|
patch -p2 -d $TmpDir/fpc/ < $SrcPatch
|
||||||
|
|
||||||
# change spec file
|
# change spec file
|
||||||
cat $SpecFile | \
|
cat $SpecFile | \
|
||||||
sed -e 's/^Version: .*/Version: '"$LazVersion/" \
|
sed -e 's/^Version: .*/Version: '"$LazVersion/" \
|
||||||
-e 's/^Release: .*/Release: '"$LazRelease/" \
|
-e 's/^Release: .*/Release: '"$LazRelease/" \
|
||||||
-e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \
|
> $SpecFile.New
|
||||||
-e 's/^\%doc \(\%{exampledir}\/\)\*/\1/' \
|
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \
|
||||||
> $SpecFile
|
mv $SpecFile.New $SpecFile
|
||||||
|
|
||||||
# change Makefile for new rpmbuild
|
# change Makefile for new rpmbuild
|
||||||
cd $TmpDir/fpc
|
cd $TmpDir/fpc
|
||||||
|
|||||||
40
tools/install/fpcsrc-patch
Normal file
40
tools/install/fpcsrc-patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
diff -rc old_11_rpm/fpc/install/fpc.spec 11_rpm/fpc/install/fpc.spec
|
||||||
|
*** old_11_rpm/fpc/install/fpc.spec 2003-05-29 18:55:30.000000000 +0200
|
||||||
|
--- 11_rpm/fpc/install/fpc.spec 2003-06-07 17:50:21.000000000 +0200
|
||||||
|
***************
|
||||||
|
*** 72,77 ****
|
||||||
|
--- 72,88 ----
|
||||||
|
# create link
|
||||||
|
ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
|
||||||
|
|
||||||
|
+ # Workaround:
|
||||||
|
+ # fpcmake creates a Makefile, that always creates things in /usr/doc
|
||||||
|
+ # Save the real doc directory, delete /usr/doc and restore
|
||||||
|
+ mv %{buildroot}%{_docdir} %{buildroot}/tmpdoc
|
||||||
|
+ rm -rf %{buildroot}/usr/doc
|
||||||
|
+ mv %{buildroot}/tmpdoc %{buildroot}%{_docdir}
|
||||||
|
+
|
||||||
|
+ # Workaround:
|
||||||
|
+ # delete lexyacc
|
||||||
|
+ rm -rf %{buildroot}/usr/lib/fpc/lexyacc
|
||||||
|
+
|
||||||
|
|
||||||
|
%clean
|
||||||
|
make compiler_clean
|
||||||
|
***************
|
||||||
|
*** 87,93 ****
|
||||||
|
|
||||||
|
%post
|
||||||
|
# Create config
|
||||||
|
! %{fpcdir}/samplecfg %{fpcdir}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
--- 98,104 ----
|
||||||
|
|
||||||
|
%post
|
||||||
|
# Create config
|
||||||
|
! %{fpcdir}/samplecfg %{_libdir}/fpc/\$version
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
Loading…
Reference in New Issue
Block a user