fixed create fpc rpm

git-svn-id: trunk@2722 -
This commit is contained in:
mattias 2002-08-18 04:56:58 +00:00
parent caa329c29e
commit 9b21e012eb
2 changed files with 48 additions and 4 deletions

View File

@ -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

View 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)