#12 improved man pages and some minor points. First steps to an unification for openSUSE and Fedora
Opened a year ago by dsteuer. Modified a year ago
dsteuer/r2spec master  into  master

file modified
+9 -1

@@ -10,7 +10,7 @@ 

  -u <url to sources>

  .br

  .B R2rpm

- - s <path to sources file>

+ -s <path to sources file>

  

  .SH DESCRIPTION

  

@@ -65,6 +65,14 @@ 

  .B --name

      Name of the packager to use in the spec file.

  .sp

+ .B --no-check

+     Leave out the R CMD check step. Default is performing the check.

+     Note: this requires all suggested packages to be installed.

+     Building all packages without this option leads to cyclic dependencies.

+ .sp

+ .B --no-suggest

+     Leave out suggested packages from the requirements. 

+ .sp

  .B --email

      Email of the packager to use in the spec file.

  .sp

file added
+69

@@ -0,0 +1,69 @@ 

+ #

+ # spec file for package R2spec

+ #

+ # Copyright (c) 2018 SUSE LINUX 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/

+ #

+ 

+ # sitelib for noarch packages, sitearch for others (remove the unneeded one)

+ 

+ Name:           R2spec

+ Version:        4.2.1

+ Release:        5

+ Summary:        Python script to generate R spec file

+ Group:          Development/Languages/Other

+ License:        GPL-3.0+

+ URL:            https://pagure.io/r2spec

+ Source0:        R2spec-%{version}.tar.gz

+ Source1:        opensuse-specfile.tpl

+ BuildRoot:      %{_tmppath}/%{name}-%{version}-build

+ BuildRequires:  python-devel

+ BuildArch:      noarch

+ Requires:       R-base

+ Requires:       python-base

+ Requires:       python-argparse

+ Requires:       python-jinja2

+ Requires:       rpm-build

+ Requires:       wget

+ Provides:       R2rpm >= 1.0.0

+ 

+ %description

+ R2spec is a small python tool that generates spec file for R libraries.

+ It can work from a URL or a tarball.

+ R2spec provides R2rpm which generates rpm for R libraries using the 

+ R2spec API.

+ 

+ %prep

+ %setup -q

+ 

+ %build

+ python setup.py build

+ 

+ %install

+ python setup.py install --prefix=%{_prefix} --root=%{buildroot}

+ 

+ install -m 0755 r2spec/opensuse-specfile.tpl %{buildroot}/%{python_sitelib}/r2spec/specfile.tpl

+ 

+ %files

+ %defattr(-,root,root,-)

+ %doc README LICENSE CHANGELOG

+ %{python_sitelib}/*

+ %dir %{_sysconfdir}/%{name}

+ %config(noreplace) %{_sysconfdir}/%{name}/repos.cfg

+ %{_bindir}/%{name}

+ %{_bindir}/R2rpm

+ %{_mandir}/man1/%{name}.1.gz

+ %{_mandir}/man1/R2rpm.1.gz

+ 

+ %changelog

+ 

file modified
+8

@@ -65,6 +65,14 @@ 

  .B --name

      Name of the packager to use in the spec file.

  .sp

+ .B --no-check

+     Leave out the R CMD check step. Default is performing the check.

+     Note: this requires all suggested packages to be installed.

+     Building all packages without this option leads to cyclic dependencies.

+ .sp

+ .B --no-suggest

+     Leave out suggested packages from the requirements. 

+ .sp

  .B --email

      Email of the packager to use in the spec file.

  .sp

@@ -0,0 +1,77 @@ 

+ #

+ # spec file for package {{ packname }}

+ # This file is (mostly) auto-generated using information

+ # in the package source, esp. Description and Summary.

+ # Improvements in that area should be discussed with upstream.

+ #

+ # Copyright (c) 2018 SUSE LINUX 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 packname  {{ packname }}

+ %global rlibdir   %{_libdir}/R/library

+ 

+ Name:           R-%{packname}

+ Version:        {{version}}

+ Release:        0

+ Summary:        {{summary}}

+ Group:          Development/Libraries/Other

+ License:        {{license}}

+ URL:            http://cran.r-project.org/web/packages/%{packname}

+ Source:         {{source0}}

+ BuildRoot:      %{_tmppath}/%{name}-%{version}-build

+ Requires:       R-base

+ {% if depends != "" %}Requires:       {{depends}}{% endif %}

+ {% if imports != "" %}Requires:       {{imports}}{% endif %}

+ {% if suggests != "" %}# Package suggestions

+ #Recommends:    {{suggests}} {% endif %}

+ BuildRequires:  texlive

+ BuildRequires:  texinfo

+ BuildRequires:  fdupes

+ BuildRequires:  R-base-devel

+ {% if depends != "" %}BuildRequires:       {{depends}}{% endif %}

+ {% if imports != "" %}BuildRequires:       {{imports}}{% endif %}

+ {% if needscompilation == "yes" %}BuildRequires:       gcc gcc-c++ gcc-fortran {% endif %}

+ {% if suggests != ""%}# Package suggestions, not required to build, but for packaging checks

+ BuildRequires:  {{suggests}} {% endif%}

+ %description

+ {{description}}

+ 

+ %prep

+ %setup -q -c -n %{packname}

+ 

+ %build

+ 

+ %install

+ 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 %{buildroot}%{rlibdir}/R.css

+ {% if (no_check == False) %}

+ %check

+ %{_bindir}/R CMD check %{packname}

+ {% endif %}

+ 

+ %files

+ %dir %{rlibdir}/%{packname}

+ %doc %{rlibdir}/%{packname}/doc

+ %doc %{rlibdir}/%{packname}/html

+ %doc %{rlibdir}/%{packname}/DESCRIPTION

+ %doc %{rlibdir}/%{packname}/NEWS

+ %{rlibdir}/%{packname}/INDEX

+ %{rlibdir}/%{packname}/NAMESPACE

+ %{rlibdir}/%{packname}/Meta

+ %{rlibdir}/%{packname}/R

+ %{rlibdir}/%{packname}/help

+ 

+ %changelog

file modified
+3 -1

@@ -173,7 +173,8 @@ 

          self.__dict['name'] = self.settings.get('packager')

          self.__dict['email'] = self.settings.get('email')

          self.__dict['no_check'] = self.no_check

- 

+         self.__dict['needscompilation'] = self.package.get('NeedsCompilation')

+         

      def generate_files(self, files):

          """ Generate the list of files to add to the spec.

  

@@ -209,6 +210,7 @@ 

                  linefiles.append(filename.strip())

  

          fileout = []

+         fileout.append("%dir %{rlibdir}/%{packname}")

          for doc in set(linedocs):

              fileout.append(doc)

          for files in set(linefiles):

file modified
+5 -5

@@ -1,3 +1,8 @@ 

+ [repo:cran]

+ url = http://cran.r-project.org/web/packages/%{packname}/index.html

+ source = http://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz

+ package = http://cran.r-project.org/src/contrib/PACKAGES

+ 

  [repo:bioconductor]

  url = http://bioconductor.org/packages/release/bioc/html/%{packname}.html

  source = http://bioconductor.org/packages/release/bioc/src/contrib/%{packname}_%{version}.tar.gz

@@ -13,11 +18,6 @@ 

  source = http://bioconductor.org/packages/release/data/experiment/src/contrib/%{packname}_%{version}.tar.gz

  package = http://bioconductor.org/packages/release/data/experiment/src/contrib/PACKAGES

  

- [repo:cran]

- url = http://cran.r-project.org/web/packages/%{packname}/index.html

- source = http://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz

- package = http://cran.r-project.org/src/contrib/PACKAGES

- 

  [repo:r-forge]

  url = https://r-forge.r-project.org/projects/%{packname}/index.html

  source = https://r-forge.r-project.org/src/contrib/%{packname}_%{version}.tar.gz

  • Added --no-check and --no-suggest to man pages
    ( and use these options instead of changes in template)
  • Added openSUSE spec and template (just to have them, may be there are better way to support openSUSE)
  • use NeedCompilation and if so add compilers to BuildRequires
  • Added rpm-build to R2Spec.spec (for now only for openSUSE) to the Requires.
  • R2rpm now includes the package directory in the filelist (finally package abe builds in OBS with an automatically generated spec!)
  • sequence of repo checks changed. CRAN is most important, at least as default.

1 new commit added

  • incorporated stuff from
a year ago

1 new commit added

  • magic line to set python_sitelib no longer needed
a year ago