diff --git a/_service b/_service new file mode 100644 index 0000000..856d4fe --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + git@github.com:openSUSE/obs-service-recompress.git + git + .git + git-master + @PARENT_TAG@ + master + 4873976e1f935aa40bd144c221bfd1b7da558ee2 + + + *.tar + gz + + + + obs-service-recompress + + \ No newline at end of file diff --git a/obs-service-recompress-0.2.tar.gz b/obs-service-recompress-0.2.tar.gz new file mode 100644 index 0000000..60cafa1 --- /dev/null +++ b/obs-service-recompress-0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b458102204cbdae74bd72d4da6e0c77d3a6bc4e22880ad2e5278e89d7bf81af +size 1593 diff --git a/obs-service-recompress.changes b/obs-service-recompress.changes index 4f5e9bd..50255a7 100644 --- a/obs-service-recompress.changes +++ b/obs-service-recompress.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 29 13:53:50 UTC 2013 - speilicke@suse.com + +- Move service to github.com/openSUSE/obs-service-recompress +- Add _service file to update package from there +- Drop local sources and use tarball from source services + ------------------------------------------------------------------- Thu Mar 1 18:50:01 GMT 2012 - aspiers@suse.com diff --git a/obs-service-recompress.spec b/obs-service-recompress.spec index 5c3cf69..3dc426f 100644 --- a/obs-service-recompress.spec +++ b/obs-service-recompress.spec @@ -1,7 +1,7 @@ # # spec file for package obs-service-recompress # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,19 @@ # +%define service recompress -Name: obs-service-recompress +Name: obs-service-%{service} +Version: 0.2 +Release: 0 +Summary: An OBS source service: Recompress files License: GPL-2.0+ Group: Development/Tools/Building -Summary: An OBS source service: Recompress files -Version: 0.2 -Release: 1 -Url: https://build.opensuse.org/package/show?package=obs-service-recompress&project=openSUSE%3ATools -Source: recompress -Source1: recompress.service -Requires: xz gzip bzip2 +Url: https://github.com/openSUSE/obs-service-%{service} +Source: %{name}-%{version}.tar.gz +Requires: bzip2 +Requires: gzip +Requires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -42,18 +44,18 @@ It supports to compress, uncompress or recompress files from or to %prep -%setup -q -D -T 0 -n . +%setup -q %build %install -mkdir -p $RPM_BUILD_ROOT/usr/lib/obs/service -install -m 0755 %{SOURCE0} $RPM_BUILD_ROOT/usr/lib/obs/service -install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/obs/service +mkdir -p %{buildroot}%{_prefix}/lib/obs/service +install -m 0755 recompress %{buildroot}%{_prefix}/lib/obs/service +install -m 0644 recompress.service %{buildroot}%{_prefix}/lib/obs/service %files %defattr(-,root,root) -%dir /usr/lib/obs -/usr/lib/obs/service +%dir %{_prefix}/lib/obs +%{_prefix}/lib/obs/service %changelog diff --git a/recompress b/recompress deleted file mode 100644 index fb8d96a..0000000 --- a/recompress +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash - -# A simple script to checkout or update a svn or git repo as source service -# -# (C) 2010 by Adrian Schröter -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# See http://www.gnu.org/licenses/gpl-2.0.html for full license text. - -# defaults -MYCOMPRESSION="" -FILES="" - -while test $# -gt 0; do - case $1 in - *-compression) - MYCOMPRESSION="$2" - shift - ;; - *-file) - FILES="$FILES ${2##*/}" - shift - ;; - *-outdir) - MYOUTDIR="$2" - shift - ;; - *) - echo Unknown parameter $1. - echo 'Usage: recompress --compression $COMPRESSION --file $FILE --outdir $OUT' - exit 1 - ;; - esac - shift -done - -if [ -z "$MYCOMPRESSION" ]; then - MYCOMPRESSION="bz2" -fi -if [ -z "$FILES" ]; then - echo "ERROR: no inputs files are given via --file parameter!" - exit 1 -fi -if [ -z "$MYOUTDIR" ]; then - echo "ERROR: no output directory is given via --outdir parameter!" - exit 1 -fi - -for i in $FILES; do - FILE=`ls -1 "$i" || ls -1 "_service:*:$i"` - if [ ! -f "$FILE" ]; then - echo "Unknown file $i" - exit 1 - fi - UNCOMPRESS="cat" - BASENAME="$FILE" - if [ "${FILE%.gz}" != "$FILE" ]; then - UNCOMPRESS="gunzip -c" - BASENAME="${FILE%.gz}" - elif [ "${FILE%.tgz}" != "$FILE" ]; then - UNCOMPRESS="gunzip -c" - BASENAME="${FILE%.tgz}.tar" - elif [ "${FILE%.bz2}" != "$FILE" ]; then - UNCOMPRESS="bunzip2 -c" - BASENAME="${FILE%.bz2}" - elif [ "${FILE%.xz}" != "$FILE" ]; then - UNCOMPRESS="xz -dc" - BASENAME="${FILE%.xz}" - fi - - if [ "$MYCOMPRESSION" == "gz" ]; then - COMPRESS="gzip -c -n --rsyncable -" - NEWFILE="${BASENAME#_service:}.gz" - elif [ "$MYCOMPRESSION" == "bz2" ]; then - COMPRESS="bzip2 -c -" - NEWFILE="${BASENAME#_service:}.bz2" - elif [ "$MYCOMPRESSION" == "xz" ]; then - COMPRESS="xz -c -" - NEWFILE="${BASENAME#_service:}.xz" - elif [ "$MYCOMPRESSION" == "none" ]; then - COMPRESS="cat -" - NEWFILE="${BASENAME#_service:}" - else - echo "ERROR: Unknown compression $MYCOMPRESSION" - exit 1 - fi - - # do the real work - $UNCOMPRESS "$FILE" | $COMPRESS > "$MYOUTDIR/$NEWFILE" || exit 1 - echo "Compressed $FILE to $NEWFILE" - - # we can remove service files, no need to store them twice - rm -f "$FILE" -done - -exit 0 diff --git a/recompress.service b/recompress.service deleted file mode 100644 index ce6e14e..0000000 --- a/recompress.service +++ /dev/null @@ -1,22 +0,0 @@ - - Change File Compression - This service supports to compress, uncompress or recompress files from or to - none : No Compression - gz : Gzip Compression - bz2 : Bzip2 Compression - xz : XZ Compression - - - Used compression - none - gz - bz2 - xz - - - - name of file to be recompressed. RegExp are allowed. - - - -