File suse-specfile.patch of Package rpmdevtools

diff -Naur rpmdevtools-8.3.orig/newspec.conf rpmdevtools-8.3/newspec.conf
--- rpmdevtools-8.3.orig/newspec.conf	2011-04-07 21:22:24.000000000 +0300
+++ rpmdevtools-8.3/newspec.conf	2012-11-15 22:30:45.931268620 +0200
@@ -3,7 +3,7 @@
 # Set NEWSPEC_PREFER_MACROS to a non-empty value if you prefer macro style
 # variables over shell style ones.
 #
-#NEWSPEC_PREFER_MACROS=
+NEWSPEC_PREFER_MACROS=1
 
 # Set NEWSPEC_MIN_RPMVER to the minimum version of rpmbuild you want
 # to support with the generated specfiles.  See the -r option in the
diff -Naur rpmdevtools-8.3.orig/spectemplate-R.spec rpmdevtools-8.3/spectemplate-R.spec
--- rpmdevtools-8.3.orig/spectemplate-R.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-R.spec	2013-02-24 19:45:43.068238257 +0200
@@ -1,3 +1,21 @@
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
 %define packname %(echo %{name} | sed -e 's/^R-//')
 %global packrel 1
 # Pick one of these (_datadir for noarch, _libdir for others), remove the other
@@ -6,22 +24,20 @@
 
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          Applications/Engineering
 License:        
-URL:            http://cran.r-project.org/web/packages/%{packname}/
-Source0:        ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}-%{packrel}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildArch:      
+Group:          Applications/Engineering
+Url:            http://cran.r-project.org/web/packages/%{packname}/
+Source0:        ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}-%{packrel}.tar.bz2
 BuildRequires:  R-devel
 BuildRequires:  tex(latex)
 Requires(post): R-core
 Requires(postun): R-core
 # Remove this from non-noarch packages
 Requires:       R-core
+# BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -29,26 +45,17 @@
 %prep
 %setup -q -c -n %{packname}
 
-
 %build
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{rlibdir}
-%{_bindir}/R CMD INSTALL -l $RPM_BUILD_ROOT%{rlibdir} %{packname}
+mkdir -p %{buildroot}%{rlibdir}
+%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
 test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
-rm -f $RPM_BUILD_ROOT%{rlibdir}/R.css
-
+rm -f %{buildroot}%{rlibdir}/R.css
 
 %check
 %{_bindir}/R CMD check %{packname}
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
 %defattr(-,root,root,-)
 %dir %{rlibdir}/%{packname}
@@ -63,5 +70,4 @@
 %{rlibdir}/%{packname}/R-ex
 %{rlibdir}/%{packname}/help
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-dummy.spec rpmdevtools-8.3/spectemplate-dummy.spec
--- rpmdevtools-8.3.orig/spectemplate-dummy.spec	2013-02-24 21:01:20.931833665 +0200
+++ rpmdevtools-8.3/spectemplate-dummy.spec	2013-02-24 20:59:12.271024145 +0200
@@ -1,12 +1,29 @@
+#
+# spec file for package dummy
+#
+# 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
+# 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:           
 Version:        1.0
-Release:        1%{?dist}
+Release:        0
 Summary:        Dummy test package
-
-Group:          Development/Debug
-License:        Public Domain
-URL:            http://fedoraproject.org/
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+License:        SUSE-Public-Domain
+Group:          Productivity/Other
+Url:            http://www.opensuse.org/
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -18,11 +35,6 @@
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 
 %files
diff -Naur rpmdevtools-8.3.orig/spectemplate-lib.spec rpmdevtools-8.3/spectemplate-lib.spec
--- rpmdevtools-8.3.orig/spectemplate-lib.spec	2011-11-06 13:43:51.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-lib.spec	2013-02-24 20:38:53.790832086 +0200
@@ -1,16 +1,34 @@
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# See also http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
+
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          System Environment/Libraries
 License:        
-URL:            
+Group:          System/Libraries
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildRequires:  
 Requires:       
+BuildRoot:     %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -18,37 +36,27 @@
 %package        devel
 Summary:        Development files for %{name}
 Group:          Development/Libraries
-Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       %{name} = %{version}
 
 %description    devel
 The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
-
 %prep
 %setup -q
 
-
 %build
 %configure --disable-static
 make %{?_smp_mflags}
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+make install DESTDIR=%{buildroot}
+find %{buildroot} -name '*.la' -exec rm -f {} ';'
 
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
-
 %files
 %defattr(-,root,root,-)
 %doc
@@ -60,5 +68,4 @@
 %{_includedir}/*
 %{_libdir}/*.so
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-minimal.spec rpmdevtools-8.3/spectemplate-minimal.spec
--- rpmdevtools-8.3.orig/spectemplate-minimal.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-minimal.spec	2013-02-24 20:48:24.394911132 +0200
@@ -1,16 +1,34 @@
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
+
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          
 License:        
-URL:            
+Group:          
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildRequires:  
 Requires:       
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -18,25 +36,16 @@
 %prep
 %setup -q
 
-
 %build
 %configure
 make %{?_smp_mflags}
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+make install DESTDIR=%{buildroot}
 
 %files
 %defattr(-,root,root,-)
 %doc
 
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-ocaml.spec rpmdevtools-8.3/spectemplate-ocaml.spec
--- rpmdevtools-8.3.orig/spectemplate-ocaml.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-ocaml.spec	2013-02-24 19:50:06.454034614 +0200
@@ -1,3 +1,21 @@
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
 %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
 %global debug_package %{nil}
 %global _use_internal_dependency_generator 0
@@ -7,19 +25,17 @@
 
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          Development/Libraries
 License:        
-URL:            
+Group:          Development/Libraries
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildRequires:  ocaml >= 3.10.0
 BuildRequires:  ocaml-findlib-devel
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  chrpath
+BuildRoot:       %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -27,17 +43,15 @@
 %package        devel
 Summary:        Development files for %{name}
 Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
+Requires:       %{name} = %{version}
 
 %description    devel
 The %{name}-devel package contains libraries and signature files for
 developing applications that use %{name}.
 
-
 %prep
 %setup -q -n %{libname}-%{version}
 
-
 %build
 # You may need a %%configure step here (or ./configure if it doesn't work).
 make byte
@@ -45,23 +59,16 @@
 make opt
 %endif
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
 # These rules work if the library uses 'ocamlfind install' to install itself.
-export DESTDIR=$RPM_BUILD_ROOT
-export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+export DESTDIR=%{buildroot}
+export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
 make install
 
-strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
+#strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
 chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
 %defattr(-,root,root,-)
 %doc LICENSE
@@ -75,7 +82,6 @@
 %{_libdir}/ocaml/stublibs/*.so
 %{_libdir}/ocaml/stublibs/*.so.owner
 
-
 %files devel
 %defattr(-,root,root,-)
 %doc LICENSE README
@@ -86,5 +92,4 @@
 %endif
 %{_libdir}/ocaml/*/*.mli
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-perl.spec rpmdevtools-8.3/spectemplate-perl.spec
--- rpmdevtools-8.3.orig/spectemplate-perl.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-perl.spec	2013-02-24 20:43:53.921104377 +0200
@@ -1,20 +1,38 @@
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# CAUTION: better use cpanspec, see also http://en.opensuse.org/openSUSE:Packaging_Perl
+
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          Development/Libraries
 License:        
-URL:            
+Group:          Development/Libraries/Perl
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildArch:      
 # Correct for lots of packages, other common choices include eg. Module::Build
 BuildRequires:  perl(ExtUtils::MakeMaker)
-Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-%{?perl_default_filter}
+BuildRequires:  perl
+BuildRequires:  perl-macros
+%{perl_requires}
+# BuildArch:      noarch
+BuildRoot:       %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -22,34 +40,23 @@
 %prep
 %setup -q
 
-
 %build
 # Remove OPTIMIZE=... from noarch packages (unneeded)
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
-make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
-# Remove the next line from noarch packages (unneeded)
-find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
-%{_fixperms} $RPM_BUILD_ROOT/*
-
+%perl_make_install
+%perl_process_packlist
+%perl_gen_filelist
 
 %check
 make test
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
-%files
+%files -f %{name}.files
 %defattr(-,root,root,-)
 %doc
+# In case that files have to be manually added
 # For noarch packages: vendorlib
 %{perl_vendorlib}/*
 # For arch-specific packages: vendorarch
@@ -57,5 +64,4 @@
 %exclude %dir %{perl_vendorarch}/auto/
 %{_mandir}/man3/*.3*
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-php-pear.spec rpmdevtools-8.3/spectemplate-php-pear.spec
--- rpmdevtools-8.3.orig/spectemplate-php-pear.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-php-pear.spec	2013-02-24 20:41:56.302430632 +0200
@@ -1,59 +1,66 @@
-%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name %(echo %{name} | sed -e 's/^php-pear-//' -e 's/-/_/g')
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# See also http://en.opensuse.org/openSUSE:Packaging_PHP
+
+%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
+%define pear_xmldir  /var/lib/pear
 
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          
 License:        
-URL:            http://pear.php.net/package/%{pear_name}
-Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+Group:          
+Url:            http://pear.php.net/package/%{pear_name}
+Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tar.bz2
+BuildRequires:  php5-pear >= 5.1.1
+Requires:       php
+Requires:       php5-pear
+Requires(post): pear
+Requires(postun): pear
 BuildArch:      noarch
-BuildRequires:  php-pear >= 1:1.4.9-1.2
-Requires:       php-pear(PEAR)
-Requires(post): %{__pear}
-Requires(postun): %{__pear}
-Provides:       php-pear(%{pear_name}) = %{version}
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
 
 %prep
-%setup -q -c
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
-cd %{pear_name}-%{version}
-
+%setup -q -c -T
 
 %build
-cd %{pear_name}-%{version}
 # Empty build section, most likely nothing required.
 
-
 %install
 cd %{pear_name}-%{version}
-rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
+rm -rf docdir
+%{__pear} install --nodeps --packagingroot %{buildroot} %{pear_name}.xml
 
 # Move documentation
 mkdir -p docdir
-mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir
+mv %{buildroot}%{pear_docdir}/* docdir
 
 # Clean up unnecessary files
-rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
+rm -rf %{buildroot}%{pear_phpdir}/.??*
 
 # Install XML package description
-mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+mkdir -p %{buildroot}%{pear_xmldir}
+install -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir}
 
 %post
 %{__pear} install --nodeps --soft --force --register-only \
@@ -65,7 +72,6 @@
         %{pear_name} >/dev/null || :
 fi
 
-
 %files
 %defattr(-,root,root,-)
 %doc %{pear_name}-%{version}/docdir/%{pear_name}/*
@@ -75,5 +81,4 @@
 # Expand this as needed to avoid owning dirs owned by our dependencies
 %{pear_phpdir}/*
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-python.spec rpmdevtools-8.3/spectemplate-python.spec
--- rpmdevtools-8.3.orig/spectemplate-python.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-python.spec	2013-02-24 20:40:39.321334801 +0200
@@ -1,20 +1,34 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# See also http://en.opensuse.org/openSUSE:Packaging_Python
 
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          Development/Languages
 License:        
-URL:            
+Group:          Development/Languages/Python
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildArch:      
 BuildRequires:  python-devel
+# BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -22,20 +36,12 @@
 %prep
 %setup -q
 
-
 %build
 # Remove CFLAGS=... for noarch packages (unneeded)
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
-
+CFLAGS="%{optflags}" python setup.py build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-
- 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+python setup.py install --prefix=%{_prefix} --root %{buildroot}
 
 %files
 %defattr(-,root,root,-)
@@ -45,5 +51,4 @@
 # For arch-specific packages: sitearch
 %{python_sitearch}/*
 
-
 %changelog
diff -Naur rpmdevtools-8.3.orig/spectemplate-ruby.spec rpmdevtools-8.3/spectemplate-ruby.spec
--- rpmdevtools-8.3.orig/spectemplate-ruby.spec	2011-01-04 21:14:35.000000000 +0200
+++ rpmdevtools-8.3/spectemplate-ruby.spec	2013-02-24 20:41:02.660667068 +0200
@@ -1,26 +1,41 @@
-%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
-%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
+#
+# spec file for package [spectemplate]
+#
+# 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
+# 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/
+#
+
+
+# See also http://en.opensuse.org/openSUSE:Packaging_Ruby
 
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        0
 Summary:        
-
-Group:          Development/Languages
-
 License:        
-URL:            
+Group:          Development/Languages
+Url:            
 Source0:        
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildArch:      
-BuildRequires:  ruby ruby-devel
-Requires:       ruby(abi) = 1.8
+BuildRequires:  ruby-devel
+BuildRequires:  ruby-macros >= 1
+Requires:       ruby
 # If this package is mainly a ruby library, it should provide
 # whatever people have to require in their ruby scripts to use the library
 # For example, if people use this lib with "require 'foo'", it should provide
 # ruby(foo)
 Provides:       ruby(LIBNAME)
+# BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 
@@ -28,29 +43,22 @@
 %prep
 %setup -q
 
-
 %build
-export CFLAGS="$RPM_OPT_FLAGS"
-
+export CFLAGS="%{optflags}"
 
 %install
-rm -rf $RPM_BUILD_ROOT
+%gem_install -f
 
- 
-%check
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+%check
 
 
 %files
 %defattr(-,root,root,-)
 %doc
-# For noarch packages: ruby_sitelib
-%{ruby_sitelib}/*
-# For arch-specific packages: ruby_sitearch
-%{ruby_sitearch}/*
-
+# For noarch packages: rb_sitelibdir
+%{rb_sitelibdir}/*
+# For arch-specific packages: rb_sitearchdir
+%{rb_sitearchdir}/*
 
 %changelog