Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:42.2:Ports
kde-l10n
pre_checkin.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pre_checkin.sh of Package kde-l10n
#! /bin/sh nr="0" # for i in `ls -1 *.tar.xz | sed -e "s,.tar.xz,,"` ; do bunzip2 -c $i.tar.xz > $i.tar; tar xf $i.tar; find $i -name *.png | xargs -n1 optipng -o4; tar cf $i-new.tar $i; xdelta delta $i.tar $i-new.tar $i.xdelta; rm -rf $i; rm $i.tar $i-new.tar; done cp kde-l10n.spec.in kde-l10n.spec for lang in `ls -1 kde-l10n*tar.xz | sed -n 's,kde-l10n-\([^-]*\)-.*,\1,p'`; do languages="$languages $lang" done # if the tar is ~ >10MB - do not automate to avoid ping pong between dot releases splitlanguages="da de en_GB es et fr it nl pl pt_BR ru sv uk" for i in $splitlanguages; do test -e kde-l10n-$i-*.tar.xz || echo "ERROR: lang $i does not exist, remove from splitlanguages!" done sed="s,@LANGUAGES@,$languages," sed="$sed; s,@SPLITLANGS@,$splitlanguages," sed -i -e "$sed" kde-l10n.spec exec 4>"kde-l10n.spec.packages" setup_line="-D -T" for lang in $languages; do sed="s,#@SOURCES@,Source$nr: kde-l10n-$lang-%version.tar.xz\n#@SOURCES@," setup_line="$setup_line -b $nr" snr=$nr nr=$(( $nr + 1 )) if test -e kde-l10n-$lang-*.xdelta; then dnr=$nr nr=$(( $nr + 1 )) sed="$sed;s,#@SOURCES@,Source$dnr: kde-l10n-$lang-%version.xdelta\n#@SOURCES@," sed="$sed;s,#@EXTRACT@,bunzip2 -c %{S:$snr} > $lang.tar; md5sum $lang.tar; xdelta patch %{S:$dnr} $lang.tar $lang-new.tar; tar xf $lang-new.tar; rm $lang.tar $lang-new.tar\n#@EXTRACT@," fi if test -e kdepim-l10n-$lang-*.xz; then pnr=$nr nr=$(( $nr + 1 )) sed="$sed;s,#@SOURCES@,Source$pnr: kdepim-l10n-$lang-%{kdepim_version}.tar.xz\n#@SOURCES@," setup_line="$setup_line -b $pnr" fi plang=$lang if test "$lang" = "sr@Latn"; then lang=srLatn plang=sr fi if test "$lang" = "ca@valencia"; then lang=caValencia fi splitpackage= for sl in $splitlanguages; do if test "$lang" = "$sl"; then splitpackage=true; fi done echo "%package $lang" >&4 echo "Summary: summary" >&4 echo "Group: System/Localization" >&4 echo "Provides: locale(kdelibs4:$plang)" >&4 echo "Provides: kde4-l10n-$lang = %{version}" >&4 echo "Obsoletes: kde4-l10n-$lang < %{version}" >&4 echo "Provides: libkgeomap-lang = %{version}" >&4 echo "Obsoletes: libkgeomap-lang < %{version}" >&4 echo "Provides: kio-extras5-lang = %{version}" >&4 echo "Obsoletes: kio-extras5-lang < %{version}" >&4 echo "Supplements: packageand(kdelibs4:kde3-i18n-$lang)" >&4 if test "$lang" = "nn"; then echo "Provides: kde4-l10n-no_NY = %{version}" >&4 echo "Obsoletes: kde4-l10n-no_NY < %{version}" >&4 echo "" >&4 fi echo "" >&4 echo "%description $lang" >&4 echo "descr" >&4 echo "" >&4 if test $splitpackage; then echo "%package $lang-doc" >&4 echo "Summary: summary" >&4 echo "Group: System/Localization" >&4 echo "Provides: locale(kdelibs4:$plang)" >&4 echo "Provides: kde4-l10n-$lang-doc = %{version}" >&4 echo "Obsoletes: kde4-l10n-$lang-doc < %{version}" >&4 echo "Provides: libkgeomap-lang = %{version}" >&4 echo "Obsoletes: libkgeomap-lang < %{version}" >&4 echo "Supplements: packageand(kdelibs4:kde3-i18n-$lang)" >&4 echo "" >&4 echo "%description $lang-doc" >&4 echo "descr" >&4 echo "" >&4 echo "%package $lang-data" >&4 echo "Summary: summary" >&4 echo "Group: System/Localization" >&4 echo "Provides: locale(kdelibs4:$plang)" >&4 echo "Provides: kde4-l10n-$lang-data = %{version}" >&4 echo "Obsoletes: kde4-l10n-$lang-data < %{version}" >&4 echo "Provides: libkgeomap-lang = %{version}" >&4 echo "Obsoletes: libkgeomap-lang < %{version}" >&4 echo "Supplements: packageand(kdelibs4:kde3-i18n-$lang)" >&4 echo "%description $lang-data" >&4 echo "descr" >&4 echo "" >&4 fi if test $splitpackage; then sed="$sed;s,#@FILES@,%files $lang -f files.$lang\n%files $lang-doc -f files.doc.$lang\n%files $lang-data -f files.data.$lang\n#@FILES@," else sed="$sed;s,#@FILES@,%files $lang -f files.all.$lang\n#@FILES@," fi sed -i -e "$sed" kde-l10n.spec done sed -i -e "s,@SETUP_LIST@,$setup_line," kde-l10n.spec exec 4<&- sed -n -e '1,/PACKAGES/p' kde-l10n.spec > spec.$$ cat kde-l10n.spec.packages >> spec.$$ sed -n -e '/PACKAGES/,$p' kde-l10n.spec >> spec.$$ perl update_spec.pl spec.$$ texts > kde-l10n.spec rm spec.$$ rm kde-l10n.spec.packages osc service localrun format_spec_file
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor