#*********************************************** # R2spec # # R2spec is made to help to the creation of R specfile # It works from a source file (*.tar.gz) or a url (http://...*.tar.gz) # # # Made the 13th February 2008 # by Pierre-Yves chibon # # Version 4.1.0 -- # - Features # * Add --no-check option # * Add --no-suggest option # * Add --keep-logs option # * Add mock support for the building of the rpm # * Imports are now considered default dependencies (not optional) # - Bugs correction # * Handle use of R2spec without internet # * Fix license at the top of the files (wrong copy/paste) # * Returns at the end of the program rather than exit # * Use exceptions rather than exit # * Fix R2spec/R2rpm for EL5 (Thanks to Shawn Lower for helping on this) # * Fix invocation of R2spec/R2rpm with no arguments # # Version 4.0.0 -- 12th November 2011 # - Rewrite most of the tool # - Use tarfile to extract the sources # - Add unit-tests to test the tool # - Use logging to log the actions # # Version 3.1.0 -- # - Bugs correction # * Handles exception when using R2rpm without internet # * Fix the calling of R2spec with a tarball instead of a url by moving the sources to the %_sourcedir # - Features: # * Add nocheck option to remove the %check section from the spec (--nocheck) # * Remove the -u/--url argument (use -s/--source instead) # * Add option to specify your own spec template in the config file # * Add option to no add the suggested dependencies as requirement (--nosuggest) # * Reduce the output # * Add verbose option to see the former output (-v/--verbose) # # Version 3.0.3 -- 28th July 2010 # - Bugs correction # * Change python to %{__python} in the spec (Request from Olivier Lahaye) # * Propagate the rpm argument to the second build # * Fix source extraction (done from the source folder now) # * Fix dependencies parsing (cases: dep,dep,dep and dep(>= xxx) are now fixed) # * Use the macro %{rlibdir} in the final spec # * Fix the parsing/retrieval of the dependencies from the DESCRIPTION file # # Version 3.0.2 -- 29th June 2010 # - Bugs correction # * Fix the template # # Version 3.0.1 -- 28th June 2010 # - Bugs correction # * Noarch package should requires R (template adjusted) # * Use tar zxvf instead of xvf to unpack source (crap waiting to be re-written) # * Fix the spec template to follow the guidelines # * Download in the %_sourcedir (retrieve by rpm -E) instead of the cwd, use the cwd if no %_sourcedir # * Change output when searching for a package # * Add the url to the project in the python file (setup.py, PKG-INFO) # # Version 3.0.0 -- 05th May 2010 # - Features added # * R2spec can now be called from an external script # * Use template via jinja2 to generate the spec files (Based on an idea of Allen S. Rout) # * Create the R2rpm script which directly builds the rpm # * Add a man page for R2rpm # * Add the -p option which enable to build a spec from a package name # * Parse the PACKAGES file from the repositories to find the information for the packages # * Make the print of the TODO optional in the API # * Give the opportunity to use mock to build the RPMs (rpmbuild being the default) # * Enable to specify the mock command in the conf file # * Enable to change the argument given to rpmbuild via the conf file # (to build srpm instead of rpm for example) # - Bugs correction # * Fix the addition of the R- prefix to the dependencies # * Rewrite the reading of the DESCRIPTION file from R # * Do not enforce the spec and the source directory, reads the rpmmacros instead # Thanks to José Matos for this function # * Fix the summary if it ends with a dot "." # * Capitalize the summary by default # * Change UTF-8 to utf-8 to make emacs happy # * Fix the spec file for the dependencies of this new release # * Fix some bugs while trying to generate the RPM/SPEC from a tarball # # Version 2.5.3 -- 02nd Aug 2009 # - Features added # * Prints warning if summary is empty # * Prints warning if description is empty # * Add support for r-forge.net (option --rforge) # * Add support for r-forge.r-project.org (option --rproject) # * Add the prefix R- to the list of dependencies with a list of package to ignore (ie: R) # * Add a default source0 and url if the bioconductor release is not set # - Bugs correction # * Does not add the 'Requires:' to the spec if they are empty # * Changes the '-' into '.' if the version of the R library contains any '-' # # Version 2.5.2 -- 21st Mar 2009 # -Features added # * Do not ask to move the file if there is no %_topdir # * Add option -c/--copyFile to copy the source to %_topdir without asking # * Add the option -n/--name to specify the name of the packager # * Add the option -e/--email to specify the email of the packager # * Add the option -f/--force that create the spec file with the normal # name even if there is already such a file in the working directory # * Add zip support # * Remove the '(', ')' and the ',' in the BuildRequire and Require of the spec # * Check if the source actually exists (it was about time...) # * Better handling of the exception # * Change %define to %global in the generated spec according to the new guidelines # -Bugs correction # * Typo -> 'Copy to' and not 'copy in' # * Change the comment on the spec for x86/x86_64 and noarch # * Actually copy the source file to the SOURCES folder # * The Source0 is not a template anymore it is either from -s or it is -u # # Version 2.5.1 -- 07th Oct 2008 # -Features added # * Add the summary from Title in the DESCRIPTION file # * Add the possibility to have a ~/.R2spec.conf which overrides the /etc/R2spec.conf # -Bugs correction # * Correct a typo SOURCES != SOURCE # * Copy from ./ to ~/rpmbuild and not ../ Bug #1 # * Change "summary should be not be longer than that" to "summary should be not be longer than this" # * Create the function finishName in the spec class to avoid redundancy in the code # * Move the check of the specfile to Package.py to avoid redundancy in the code # * Change some layout in the output # # Version 2.5.0 -- 31th Aug 2008 # -Features added # * Add a file INSTALL # * Add the --bioc option for bioconductor packages # - Fill the source0 if -s is not used # - Fill the url # * Add the --cran option for cran packages # - Fill the source0 if -s is not used # - Fill the url # * Add %define BioC for the Bioconductor release of Bioconductor packages # * Add check if the package is noarch or not # * Add oportunity to copy the source in the %_topdir defined in .rpmmacros # * Add a parameter in the config file for the version on Bioconductor used # * Add a Spec class to write the spec file # * Add a Noarch class that inherit the Spec class and handle the noarch package case # * Ask what to do if the specfile is alreay in the current working directory # # -Bugs correction # * Catch the Description in the file DESCRIPTION when it is on several lines # * Catch the Depends and Suggests when they are on several lines # * Now it does load the info from the config file # * Fix some layout in this file # # Version 2.4.1 -- 20th Aug 2008 # * Correct a typo on the code for the folder tmp # * Correct default value for the package.path # # Version 2.4.0 -- 18th Aug 2008 # * Add the spec file into the sources # # Version 2.3 -- 10th Aug 2008 # * Change the argument management from # getopt to OptionParser # # Version 2.2 -- 31th Jul 2008 # * Fix some layout in the man page # * Fix some tab/space indentation error # # Version 2.1 -- 30th Jul 2008 # * Change the name of some methods from get to set # * Fix small bug of the path management # * Fix small bug in the download method # * Create the file changelog # * Change in the man page # # Version 2.0 -- 29th Jul 2008 # * Redesign of the software # * Implementation in object oriented programming # * Creation of the RPM # # Version 1.3 # * Update according to the change on the R packaging guidelines # * Correction of typos # # Version 1.2 # * Remove "-\d" if the version contains one # * Correct output typo # * From an url, check if the source are present in the working directory, # download only if not... # # Version 1.1 # * Removes the folder create by the untar the sources # * Works if the sources are in a subfolder # * Returns the usage if no argument are given # * Removes the 'tmp' directory created if is empty # # Version 1.0 # * Works from an url # * Works from a .tar.gz # # Distributed under License GPLv3 or later # You can find a copy of this license on the website # http://www.gnu.org/licenses/gpl.html # # This software has been based on the guidelines for R packaging # http://fedoraproject.org/wiki/Packaging/R # #***********************************************