From 9b21e012eb1d99abcc6ce71b039656f968918deb Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 18 Aug 2002 04:56:58 +0000 Subject: [PATCH] fixed create fpc rpm git-svn-id: trunk@2722 - --- tools/install/create_fpc_rpm.sh | 12 ++++++---- tools/install/fpcsrc-patch | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 tools/install/fpcsrc-patch diff --git a/tools/install/create_fpc_rpm.sh b/tools/install/create_fpc_rpm.sh index ef11210b38..13200dc190 100644 --- a/tools/install/create_fpc_rpm.sh +++ b/tools/install/create_fpc_rpm.sh @@ -37,6 +37,7 @@ fi Date=20$Year$Month$Day LazRelease=laz.$Date SrcTGZ=fpcsrc-$LazVersion-$LazRelease.tgz +SrcPatch=fpcsrc-patch TmpDir=/tmp/fpc$LazVersion SpecFile=$TmpDir/fpc/install/fpc.spec @@ -48,18 +49,21 @@ fi # unpack source into temporary directory rm -rf $TmpDir mkdir -p $TmpDir -cp $SrcTGZ $TmpDir/ +cp $SrcTGZ $SrcPatch $TmpDir/ cd $TmpDir tar xzf $SrcTGZ cd - +# patch sources +patch -p2 -d $TmpDir/fpc/ < $SrcPatch + # change spec file cat $SpecFile | \ sed -e 's/^Version: .*/Version: '"$LazVersion/" \ -e 's/^Release: .*/Release: '"$LazRelease/" \ - -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \ - -e 's/^\%doc \(\%{exampledir}\/\)\*/\1/' \ - > $SpecFile + > $SpecFile.New +# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \ +mv $SpecFile.New $SpecFile # change Makefile for new rpmbuild cd $TmpDir/fpc diff --git a/tools/install/fpcsrc-patch b/tools/install/fpcsrc-patch new file mode 100644 index 0000000000..6613adf7c6 --- /dev/null +++ b/tools/install/fpcsrc-patch @@ -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)