diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-09-09 15:05:24 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-09-12 22:33:28 +0200 |
commit | 3f042b60a9f3f1940d31b13f1107bdbe8635a105 (patch) | |
tree | f54e221d17b05852d108aacd24b2cffaa31c8073 | |
parent | 14e91be2f49c36ce8e4fccefc13ab6afe28db6a1 (diff) | |
download | rpm-setup-3f042b60a9f3f1940d31b13f1107bdbe8635a105.tar rpm-setup-3f042b60a9f3f1940d31b13f1107bdbe8635a105.tar.gz rpm-setup-3f042b60a9f3f1940d31b13f1107bdbe8635a105.tar.bz2 rpm-setup-3f042b60a9f3f1940d31b13f1107bdbe8635a105.tar.xz rpm-setup-3f042b60a9f3f1940d31b13f1107bdbe8635a105.zip |
kill dead file
should have been deleted in commit abcac127ed949e61e91870b8b45fd0fbd2fa9683
-rwxr-xr-x | gem_helper.rb | 171 | ||||
-rw-r--r-- | perl_base.req | 16 |
2 files changed, 3 insertions, 184 deletions
diff --git a/gem_helper.rb b/gem_helper.rb deleted file mode 100755 index fe33ce0..0000000 --- a/gem_helper.rb +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2010 Per Øyvind Karlsen <peroyvind@mandriva.org> -# This program is free software. It may be redistributed and/or modified under -# the terms of the LGPL version 2.1 (or later). -#++ - -require 'optparse' - -if ARGV[0] == "build" or ARGV[0] == "install" - require 'yaml' - require 'zlib' - - filter = nil - opts = nil - keepcache = false - fixperms = false - gemdir = nil - dry_run = false - files = [] - argv = ARGV[1..-1] - # Push this into some environment variables as the modified classes doesn't - # seem to be able to access our global variables.. </lameworkaround> - ENV['GEM_MODE'] = ARGV[0] - if ARGV[0] == "build" - opts = OptionParser.new("#{$0} <--filter PATTERN>") - opts.on("-f", "--filter PATTERN", "Filter pattern to use for gem files") do |val| - filter = val - end - opts.on("-j", "--jobs JOBS", "Number of jobs to run simultaneously.") do |val| - ENV['jobs'] = "-j"+val - end - opts.on("--dry-run", "Only show the files the gem will include") do - ARGV.delete("--dry-run") - dry_run = true - end - elsif ARGV[0] == "install" - opts = OptionParser.new("#{$0} <--keep-cache>") - opts.on("--keep-cache", "Don't delete gem copy from cache") do - ARGV.delete("--keep-cache") - keepcache = true - end - opts.on("--fix-permissions", "Force standard permissions for files installed") do - ARGV.delete("--fix-permissions") - fixperms = true - end - opts.on("-i", "--install-dir GEMDIR", "Gem repository directory") do |val| - gemdir = val - end - end - while argv.length > 0 - begin - opts.parse!(argv) - rescue OptionParser::InvalidOption => e - e.recover(argv) - end - argv.delete_at(0) - end - - file_data = Zlib::GzipReader.open("metadata.gz") { |gz| gz.read() } - header = YAML.load(file_data) - - require 'rubygems' - spec = Gem::Specification.from_yaml(YAML.dump(header)) - - if ARGV[0] == "install" - system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name]) - if !keepcache - require 'fileutils' - FileUtils.rm_rf("%s/cache" % gemdir) - end - if fixperms - chmod = "chmod u+r,u+w,g-w,g+r,o+r -R %s" % gemdir - print "\nFixing permissions:\n\n%s\n" % chmod - system("%s" % chmod) - print "\n" - end - end - - if header.extensions.size > 0 - require 'rubygems/ext' - module Gem::Ext - class Builder - def self.make(dest_path, results) - make_program = ENV['make'] - unless make_program then - make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make' - end - cmd = make_program - if ENV['GEM_MODE'] == "build" - cmd += " %s" % ENV['jobs'] - elsif ENV['GEM_MODE'] == "install" - cmd += " DESTDIR='%s' install" % ENV['DESTDIR'] - end - results << cmd - results << `#{cmd} #{redirector}` - - raise Gem::ExtensionBuildError, "make failed:\n\n#{results}" unless - $?.success? - end - end - end - - require 'rubygems/installer' - module Gem - class Installer - def initialize(spec, options={}) - @gem_dir = Dir.pwd - @spec = spec - end - end - class ConfigFile - def really_verbose - true - end - end - end - - unless dry_run - Gem::Installer.new(spec).build_extensions - else - for ext in header.extensions - files.push(ext[0..ext.rindex("/")-1]+".so") - end - end - - header.extensions.clear() - end - if ARGV[0] == "build" - header.test_files.clear() - - # We don't want ext/ in require_paths, it will only contain content for - # building extensions which needs to be installed in sitearchdir anyways.. - idx = 0 - for i in 0..header.require_paths.size()-1 - if header.require_paths[idx].match("^ext(/|$)") - header.require_paths.delete_at(idx) - else - idx += 1 - end - end - - # We'll get rid of all the files we don't really need to install - idx = 0 - for i in 0..header.files.size()-1 - if filter and header.files[idx].match(filter) - match = true - else - match = false - for path in header.require_paths - if header.files[idx].match("^%s/" % path) - match = true - end - end - end - if !match - header.files.delete_at(idx) - else - idx += 1 - end - end - - spec = Gem::Specification.from_yaml(YAML.dump(header)) - unless dry_run - Gem::Package.build(spec) - else - files.concat(spec.files) - print "%s\n" % files.join("\n") - end - end -end diff --git a/perl_base.req b/perl_base.req index eb95024..aaf2110 100644 --- a/perl_base.req +++ b/perl_base.req @@ -1,18 +1,8 @@ #!/bin/sh # Requires on perl-base -perlepoch=`rpm -q --qf '%|EPOCH?{[%{EPOCH}]:}|' perl-base` -if [ $? != 0 ]; then - unset perlepoch +perlEV=`rpm -q --qf '%{EPOCH}:%{VERSION}\n' perl-base` +if [ $? = 0 ]; then + echo "perl-base >= $perlEV" fi -tmpdeplist= - -while read instfile ; do - dep="`echo $instfile | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p"`" - if [[ -n $dep && -z `echo $uniqdeplist $tmpdeplist|grep "$dep"` ]]; then - tmpdeplist+="$dep\n" - fi -done - -echo -n -e $tmpdeplist | sort -u |