diff --git a/_service b/_service
new file mode 100644
index 0000000..cfe8863
--- /dev/null
+++ b/_service
@@ -0,0 +1,19 @@
+
+
+ git@github.com:openSUSE/obs-service-extract_file.git
+ git
+ .git
+ 0.1
+ master
+ enable
+
+
+
+ *.tar
+ gz
+
+
+
+ obs-service-extract_file
+
+
diff --git a/debian.dsc b/debian.dsc
new file mode 100644
index 0000000..964e26d
--- /dev/null
+++ b/debian.dsc
@@ -0,0 +1,8 @@
+Format: 1.0
+Source: obs-service-extract-file
+Version: 0.1
+Binary: obs-service-extract-file
+Maintainer: Adrian Schroeter
+Architecture: all
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 7)
diff --git a/extract_file b/extract_file
deleted file mode 100644
index 80be1f5..0000000
--- a/extract_file
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-
-# A simple script to checkout or update a svn or git repo as source service
-
-# defaults
-MYARCHIVE=""
-MYFILES=""
-OUTFILE="."
-
-while test $# -gt 0; do
- case $1 in
- *-archive)
- MYARCHIVE="${2##*/}"
- shift
- ;;
- *-file|*-files)
- MYFILES="$MYFILES ${2}"
- shift
- ;;
- *-outfilename)
- OUTFILE="${2}"
- shift
- ;;
- *-outdir)
- MYOUTDIR="$2"
- shift
- ;;
- *)
- echo Unknown parameter $1.
- echo 'Usage: extract_file --archive $ARCHIVE --file $FILE --outdir $OUT'
- exit 1
- ;;
- esac
- shift
-done
-
-if [ -z "$MYARCHIVE" ]; then
- echo "ERROR: no archive specified!"
- exit 1
-fi
-if [ -z "$MYFILES" ]; then
- echo "ERROR: no checkout URL is given via --file parameter!"
- exit 1
-fi
-if [ -z "$MYOUTDIR" ]; then
- echo "ERROR: no output directory is given via --outdir parameter!"
- exit 1
-fi
-set -x
-
-existing_archive="$PWD/$(echo $MYARCHIVE)"
-cd "$MYOUTDIR"
-
-if [ -e "$existing_archive" ]; then
- if [ "${existing_archive%.tar.gz}" != "$existing_archive" ]; then
- tar xfz "$existing_archive" --wildcards $MYFILES || exit 1
- elif [ "${existing_archive%.tar.bz2}" != "$existing_archive" ]; then
- tar xfj "$existing_archive" --wildcards $MYFILES || exit 1
- elif [ "${existing_archive%.tar.xz}" != "$existing_archive" ]; then
- tar xfJ "$existing_archive" --wildcards $MYFILES || exit 1
- elif [ "${existing_archive%.tar}" != "$existing_archive" ]; then
- tar xf "$existing_archive" --wildcards $MYFILES || exit 1
- elif [ "${existing_archive%.zip}" != "$existing_archive" ]; then
- unzip "$existing_archive" $MYFILES || exit 1
- else
- echo "ERROR: unknown archive format $existing_archive"
- exit 1
- fi
- for i in $MYFILES; do
- mv "$i" "$OUTFILE"
- done
-else
- echo "ERROR: archive not found: $existing_archive"
- exit 1
-fi
-
-exit 0
diff --git a/extract_file.service b/extract_file.service
deleted file mode 100644
index 5819e5f..0000000
--- a/extract_file.service
+++ /dev/null
@@ -1,16 +0,0 @@
-
- Extract files from archive
- This service can be used to extract a file from an tar or zip archive. This can be used to used a spec file directly from a tar.
-
- Archive to be used
-
-
-
- Files to extract. You may use this parameter multiple times
-
-
-
- Rename file into outfilename
-
-
-
diff --git a/obs-service-extract_file-0.1.tar.gz b/obs-service-extract_file-0.1.tar.gz
new file mode 100644
index 0000000..488e389
--- /dev/null
+++ b/obs-service-extract_file-0.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:830847e40a27690b8c5e71c1698fb752e69260234a21f1c520b559d780db2557
+size 2687
diff --git a/obs-service-extract_file.changes b/obs-service-extract_file.changes
index 6f2a9ee..0b1707e 100644
--- a/obs-service-extract_file.changes
+++ b/obs-service-extract_file.changes
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Wed Jul 9 15:43:21 UTC 2014 - jblunck@infradead.org
+
+- Update to version 0.1:
+ + Initial debianization
+ + fix it
+ + This adds posibility to define filenames with wildcards. Usable to prevent from editing the file path after each version change or after the SVN revision changes.
+ + fix error message
+ + allow subdirectories
+ + fix command parameters
+
-------------------------------------------------------------------
Tue May 10 10:02:43 UTC 2011 - adrian@suse.de
diff --git a/obs-service-extract_file.spec b/obs-service-extract_file.spec
index 60d6e87..bd26943 100644
--- a/obs-service-extract_file.spec
+++ b/obs-service-extract_file.spec
@@ -1,13 +1,33 @@
+#
+# spec file for package obs-service-extract_file
+#
+# Copyright (c) 2014 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
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
Name: obs-service-extract_file
-License: GPL v2 or later
-Group: Development/Tools/Building
Summary: An OBS source service: Extract a file from an archive
+License: GPL-2.0+
+Group: Development/Tools/Building
Version: 0.1
-Release: 1
-Source: extract_file
-Source1: extract_file.service
-Requires: tar bzip2 gzip xz unzip
+Release: 0
+Source: %{name}-%{version}.tar.gz
+Requires: bzip2
+Requires: gzip
+Requires: tar
+Requires: unzip
+Requires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -18,18 +38,18 @@ It supports to extract a file from an archive, for example a spec file from a ta
%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
+install -m 0755 extract_file $RPM_BUILD_ROOT/usr/lib/obs/service
+install -m 0644 extract_file.service $RPM_BUILD_ROOT/usr/lib/obs/service
%files
%defattr(-,root,root)
%dir /usr/lib/obs
/usr/lib/obs/service
+%changelog