d409867d84
- require coreutils (#928566) - update build scripts - update symlink references tetex -> texlive - handle texmf -> texmf-dist upstream move - do proper obsoletion again
56 lines
2.2 KiB
Bash
Executable File
56 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This script creates texlive.spec from generated specs by tl2rpm
|
|
# and generates local testing repository from built packages.
|
|
# Written by Jindrich Novy (novyjindrich@gmail.com).
|
|
#
|
|
gcc tl2rpm.c -o tl2rpm -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=native -march=native
|
|
[ "$?" != "0" ] && exit 1
|
|
rm -f _mkdirs.spec _unpack.spec _sources.spec _remove.spec _packages.spec _font.spec _files.spec _dirs.spec
|
|
touch _mkdirs.spec
|
|
./tl2rpm
|
|
if [ -d 2011 ]; then
|
|
grep ^name texlive.tlpdb | grep -v i386 | sed -s s/name\ // | sort > /tmp/tl2012
|
|
grep ^name 2011/texlive.tlpdb | grep -v i386 | sed -s s/name\ // | sort > /tmp/tl2011
|
|
diff /tmp/tl2011 /tmp/tl2012 | grep '<' | sed -s 's/^< /Obsoletes: texlive-/' | sed -s 's/$/ < %{tl_version}/' > _obsoletes.spec
|
|
diff /tmp/tl2011 /tmp/tl2012 | grep '<' | sed -s 's/^< /Obsoletes: texlive-/' | sed -s 's/$/-doc < %{tl_version}/' >> _obsoletes.spec
|
|
diff /tmp/tl2011 /tmp/tl2012 | grep '<' | sed -s 's/^< /Obsoletes: texlive-/' | sed -s 's/$/-fedora-fonts < %{tl_version}/' >> _obsoletes.spec
|
|
diff /tmp/tl2011 /tmp/tl2012 | grep '<' | sed -s 's/^< /Obsoletes: texlive-/' | sed -s 's/$/-bin < %{tl_version}/' >> _obsoletes.spec
|
|
rm -f /tmp/tl2011 /tmp/tl2012
|
|
fi
|
|
mv _mkdirs.spec _mkdirs.spec.tmp
|
|
sort _mkdirs.spec.tmp > _mkdirs.spec
|
|
rm -f _mkdirs.spec.tmp
|
|
mv _dirs.spec _dirs.spec.tmp
|
|
sort _dirs.spec.tmp > _dirs.spec
|
|
rm -f _dirs.spec.tmp
|
|
mv _sources.spec _sources.spec.tmp
|
|
sort _sources.spec.tmp > _sources.spec
|
|
rm -f _sources.spec.tmp
|
|
while read LINE; do
|
|
if [ "${LINE%% *}" = "%include" ]; then
|
|
cat ${LINE:9}
|
|
else
|
|
echo "$LINE"
|
|
fi
|
|
done < texlive.spec.template > texlive.spec
|
|
#exit 0
|
|
RPMBUILDDIR=`rpm --eval "%_topdir"`
|
|
rm -f $RPMBUILDDIR/RPMS/noarch/texlive*
|
|
rm -f $RPMBUILDDIR/RPMS/x86_64/texlive*
|
|
for i in `ls texlive/archive`; do
|
|
rm -f $RPMBUILDDIR/SOURCES/$i
|
|
done
|
|
ACTDIR=`pwd`
|
|
for i in `ls texlive/archive`; do
|
|
ln -s $ACTDIR/texlive/archive/$i $RPMBUILDDIR/SOURCES/$i
|
|
done
|
|
LANG=C time rpmbuild -bb texlive.spec > buildlog-srpm 2>&1
|
|
[ "$?" != "0" ] && exit 1
|
|
mv buildlog-srpm buildlog-srpm.full
|
|
rm -rf packages
|
|
mkdir packages
|
|
mv RPMS/noarch/texlive* packages
|
|
mv RPMS/x86_64/texlive* packages
|
|
createrepo packages
|