Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

rubyripper: adding the newly updated submission

slack-utils: various updates for having an installation process
  • Loading branch information...
commit bc2325a05992d3c93688017d19dc0e1c5b84d19f 1 parent 9ae68e8
Vincent Batts authored
5  TESTING/ipv6calc/ipv6calc.info
@@ -2,6 +2,9 @@ PRGNAM="ipv6calc"
2 2
 VERSION="0.73.0"
3 3
 HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
4 4
 DOWNLOAD="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/ipv6calc-0.73.0.tar.gz"
5  
-MD5SUM=""
  5
+MD5SUM="24141d637207532ea9a9881f968d086f"
6 6
 DOWNLOAD_x86_64=""
7 7
 MD5SUM_x86_64=""
  8
+MAINTAINER="Vincent Batts"
  9
+EMAIL="vbatts@hashbangbash.com"
  10
+APPROVED=""
2  projects/slack-utils/slack-utils.SlackBuild
@@ -23,7 +23,7 @@
23 23
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 24
 
25 25
 PRGNAM=slack-utils
26  
-VERSION=${VERSION:-0.3}
  26
+VERSION=${VERSION:-0.3.1}
27 27
 ARCH=noarch
28 28
 BUILD=${BUILD:-1}
29 29
 TAG=${TAG:-_vb}
272  projects/slack-utils/src/configure.sample
... ...
@@ -0,0 +1,272 @@
  1
+#!/usr/bin/env ruby
  2
+#    Rubyripper - A secure ripper for Linux/BSD/OSX
  3
+#    Copyright (C) 2007  Bouke Woudstra (rubyripperdev@gmail.com)
  4
+#
  5
+#    This file is part of Rubyripper. Rubyripper is free software: you can redistribute it and/or modify
  6
+#    it under the terms of the GNU General Public License as published by
  7
+#    the Free Software Foundation, either version 3 of the License, or
  8
+#    (at your option) any later version.
  9
+#
  10
+#    This program is distributed in the hope that it will be useful,
  11
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13
+#    GNU General Public License for more details.
  14
+#
  15
+#    You should have received a copy of the GNU General Public License
  16
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>
  17
+
  18
+if ENV['PWD'] == nil
  19
+	puts "Your current working directory cannot be determined."
  20
+	puts "There are two possible reasons for this:"
  21
+	puts "1) You run configure with sudo (you shouldn't)."
  22
+	puts "2) Your shell needs to export the $PWD variable."
  23
+	exit()
  24
+end
  25
+
  26
+$PREFIX='/usr/local'
  27
+$BINDIR='/bin'
  28
+$LOCALE='/share/locale'
  29
+$ICONDIR='/share/icons/hicolor/128x128/apps'
  30
+$DESKTOP='/share/applications'
  31
+$RUBYDIR= '/lib/rubyripper' #in case site_ruby doesn't return any matches
  32
+
  33
+$:.each do |ruby_dir|
  34
+	if ruby_dir.include?("site_ruby")
  35
+		if ruby_dir[0..3] == "/usr"
  36
+			$RUBYDIR = ruby_dir[4..-1] # '/usr' is prepended by $PREFIX later
  37
+		else
  38
+			$RUBYDIR = ruby_dir
  39
+		end
  40
+		break
  41
+	end
  42
+end
  43
+
  44
+if RUBY_PLATFORM.include?('darwin')
  45
+	$INSTALL = 'install'
  46
+else
  47
+	$INSTALL = 'install -D'
  48
+end
  49
+
  50
+$GTK2 = false
  51
+$CLI = false
  52
+$LANG = []
  53
+$LANG_SUPPORT = ["nl", "de", "fr", "hu", "ru", "es", "se", "bg", "it"]
  54
+
  55
+require './rr_lib.rb'
  56
+begin
  57
+	require 'gettext/utils'
  58
+rescue LoadError
  59
+	$LANG_SUPPORT = []
  60
+end
  61
+
  62
+if ARGV.include?('--help') || ARGV.include?('-h') || ARGV.length == 0
  63
+	puts ""
  64
+	puts "--prefix=<destination_dir>  (default: #{$PREFIX})"
  65
+	puts "--bindir=<bin_dir>  (default: #{$BINDIR})"
  66
+	puts "--locale=<locale_dir>  (default: #{$LOCALE})"
  67
+	puts "--icondir=<icon_theme_dir>  (default: #{$ICONDIR})"
  68
+	puts "--desktop=<desktop_dir>  (default: #{$DESKTOP})"
  69
+	puts "--ruby=<ruby_dir>  (default: #{$RUBYDIR})"
  70
+	puts ""
  71
+	puts "--enable-gtk2  (install the gtk2 frontend)"
  72
+	puts "--enable-cli  (install the cli frontend)"
  73
+	puts "--enable-lang-all  (install all locale files)"
  74
+	puts "--enable-lang=<xx>  (install specific locale file, separate with a comma)"
  75
+	puts ""
  76
+	puts "--update-lang  (updates the locale files)"
  77
+	puts "--update-lib (resets file locations in ruby files)"
  78
+	puts ""
  79
+	exit()
  80
+end
  81
+
  82
+def update_lang #will be called by the self-created Makefile :)
  83
+	if ($LANG_SUPPORT.size != 0)
  84
+		begin
  85
+			GetText.update_pofiles("rubyripper", ["rubyripper_cli.rb",
  86
+			"rubyripper_gtk2.rb", "rr_lib.rb"], "Rubyripper #{$rr_version}",
  87
+			"./locale/po")
  88
+		rescue Exception => e
  89
+			puts "\n", '*' * 80, "\n"
  90
+			puts e.backtrace
  91
+			puts e.message
  92
+			puts "\n", '*' * 80, "\n"
  93
+			puts "Unfortunately ruby-gettext crashed at updating the po file."
  94
+			puts "This is a known issue with ruby-1.9 and ruby-gettext."
  95
+			puts "See also issue 400 at http://code.google.com/p/rubyripper."
  96
+			puts "For official releases the po files are already updated."
  97
+			puts "\n", '*' * 80, "\n"
  98
+		end
  99
+		GetText.create_mofiles(true, "./locale/po", "./locale")
  100
+	end
  101
+	exit()
  102
+end
  103
+
  104
+def check_deps
  105
+	puts "Checking the NEEDED dependencies...."
  106
+	
  107
+	installed('cdparanoia') ? puts("cdparanoia found...") : puts("cdparanoia NOT found")
  108
+	
  109
+	puts "\nChecking the OPTIONAL dependencies..."
  110
+	
  111
+	puts "Testing support for the graphical frontend..."
  112
+	begin
  113
+		require 'gtk2/base'
  114
+		puts "ruby-gtk2 bindings found"
  115
+	rescue LoadError
  116
+		puts "ruby-gtk2 is not found. The graphical frontend won't work!"
  117
+	end
  118
+	
  119
+	puts "\nTesting support for freedb metadata fetching..."
  120
+	(installed('cd-discid') || installed('discid')) ? puts("cd-discid or discid found...") : puts("Neither cd-discid or discid could be found.")
  121
+	
  122
+	puts "\nTesting support for ejecting the disk tray..."
  123
+	(installed('eject') || installed('diskutil')) ? puts("eject or disktutil found...") : puts("Neither eject or disktutil could be found.")
  124
+
  125
+	puts "\nTesting support for different codecs on your system..."
  126
+	installed('flac') ? puts("flac found...") : puts("flac NOT found.")
  127
+	installed('oggenc') ? puts("oggenc (vorbis) found...") : puts("oggenc (vorbis) NOT found.")
  128
+	installed('lame') ? puts("lame (mp3) found...") : puts("lame (mp3) NOT found.")
  129
+	
  130
+	puts "\nTesting support for replaygain..."
  131
+	installed('wavegain') ? puts("wavegain found...") : puts("wavegain NOT found.")
  132
+	installed('vorbisgain') ? puts("vorbisgain found...") : puts("vorbisgain NOT found.")
  133
+	installed('mp3gain') ? puts("mp3gain found...") : puts("mp3gain NOT found.")
  134
+	
  135
+	puts "\nTesting support for normalize..."
  136
+	installed('normalize') ? puts("normalize found...") : puts("normalize NOT found")
  137
+end
  138
+
  139
+def update_lib
  140
+	['rr_lib.rb', 'rubyripper_gtk2.rb', 'rubyripper_cli.rb'].each do |filename|
  141
+		file = File.readlines(filename)
  142
+		index = 0
  143
+		file.each do |line|
  144
+			if line =~ /LOCALE=/
  145
+				file[index] = "LOCALE=[ENV['PWD'] + \"/locale\", \"#{$PREFIX + $LOCALE}\"]"
  146
+				break
  147
+			elsif line =~ /ICONDIR=/
  148
+				file[index] = "ICONDIR=[ENV['PWD'], \"#{$PREFIX + $ICONDIR}\"]"
  149
+			elsif line =~ /RUBYDIR=/
  150
+				file[index] = "RUBYDIR=[ENV['PWD'], File.dirname(__FILE__), \"#{$PREFIX + $RUBYDIR}\"]"
  151
+				break
  152
+			end
  153
+			index += 1
  154
+		end
  155
+		outputfile = File.open(filename, "w+")
  156
+		file.each{|line| outputfile.puts line}
  157
+		outputfile.close()
  158
+	end
  159
+end
  160
+
  161
+ARGV.each do |argument|
  162
+	if argument[0,9] == "--prefix="
  163
+		$PREFIX = argument[9..-1]
  164
+	elsif argument[0,9] == "--bindir="
  165
+		$BINDIR = argument[9..-1]
  166
+	elsif argument[0,9] == "--locale="
  167
+		$LOCALE = argument[9..-1]
  168
+	elsif argument[0,10] == "--icondir="
  169
+		$ICONDIR = argument[10..-1]
  170
+	elsif argument[0,10] == "--desktop="
  171
+		$DESKTOP = argument[10..-1]
  172
+	elsif argument[0,7] == "--ruby="
  173
+		$RUBYDIR = argument[7..-1]
  174
+	elsif argument == '--enable-gtk2'
  175
+		$GTK2 = true
  176
+	elsif argument == '--enable-cli'
  177
+		$CLI = true
  178
+	elsif argument == '--enable-lang-all'
  179
+		$LANG=$LANG_SUPPORT
  180
+	elsif argument[0,14] == '--enable-lang='
  181
+		argument[14..-1].split(',').each{|lang| if $LANG_SUPPORT.include?(lang) ; $LANG << lang end}
  182
+	elsif argument == "--update-lang"
  183
+		update_lang()
  184
+	elsif argument == "--update-lib"
  185
+		update_lib()
  186
+		exit()
  187
+	end
  188
+end
  189
+
  190
+unless ($GTK2 || $CLI)
  191
+	puts "You have to choose at least one frontend you want to install!"
  192
+	puts ""
  193
+	exit()
  194
+end
  195
+
  196
+check_deps()
  197
+
  198
+puts "Creating the Makefile..."
  199
+makefile = File.new("Makefile", "w+")
  200
+makefile.puts "#This Makefile is automatically created by configure"
  201
+makefile.puts ""
  202
+makefile.puts "BINDIR=#{$PREFIX}#{$BINDIR}"
  203
+makefile.puts "LOCALE=#{$PREFIX}#{$LOCALE}"
  204
+makefile.puts "ICONDIR=#{$PREFIX}#{$ICONDIR}"
  205
+makefile.puts "DESKTOP=#{$PREFIX}#{$DESKTOP}"
  206
+makefile.puts "RUBYDIR=#{$PREFIX}#{$RUBYDIR}"
  207
+makefile.puts ""
  208
+makefile.puts "all:"
  209
+makefile.puts "\truby configure --update-lang #update the locale files"
  210
+makefile.puts ""
  211
+makefile.puts "install: all"
  212
+makefile.puts "\t#{$INSTALL} -m 644 rr_lib.rb $(prefix)$(DESTDIR)$(RUBYDIR)/rr_lib.rb"
  213
+
  214
+if $GTK2
  215
+	makefile.puts "\t#{$INSTALL} -m 755 rubyripper_gtk2.rb $(prefix)$(DESTDIR)$(BINDIR)/rrip_gui"
  216
+	makefile.puts "\t#{$INSTALL} -m 644 rubyripper.png $(prefix)$(DESTDIR)$(ICONDIR)/rubyripper.png"
  217
+	makefile.puts "\t#{$INSTALL} -m 644 rubyripper.desktop $(prefix)$(DESTDIR)$(DESKTOP)/rubyripper.desktop"
  218
+end
  219
+
  220
+if $CLI
  221
+	makefile.puts "\t#{$INSTALL} -m 755 -D rubyripper_cli.rb $(prefix)$(DESTDIR)$(BINDIR)/rrip_cli"
  222
+end
  223
+
  224
+$LANG.each do |lang|
  225
+	makefile.puts "\t#{$INSTALL} -m 644 locale/#{lang}/LC_MESSAGES/rubyripper.mo $(prefix)$(DESTDIR)$(LOCALE)/#{lang}/LC_MESSAGES/rubyripper.mo"
  226
+end
  227
+
  228
+makefile.puts ""
  229
+makefile.puts "uninstall:"
  230
+makefile.puts "\trm $(prefix)$(DESTDIR)$(RUBYDIR)/rr_lib.rb"
  231
+
  232
+if $GTK2
  233
+	makefile.puts "\trm $(prefix)$(DESTDIR)$(BINDIR)/rrip_gui"
  234
+	makefile.puts "\trm $(prefix)$(DESTDIR)$(ICONDIR)/rubyripper.png"
  235
+	makefile.puts "\trm $(prefix)$(DESTDIR)$(DESKTOP)/rubyripper.desktop"
  236
+end
  237
+
  238
+if $CLI
  239
+	makefile.puts "\trm $(prefix)$(DESTDIR)$(BINDIR)/rrip_cli"
  240
+end
  241
+
  242
+$LANG.each do |lang|
  243
+	makefile.puts "\trm $(prefix)$(DESTDIR)$(LOCALE)/#{lang}/LC_MESSAGES/rubyripper.mo"
  244
+end
  245
+makefile.puts ""
  246
+makefile.puts "clean:"
  247
+makefile.puts "\truby configure --update-lib"
  248
+makefile.puts "\trm Makefile"
  249
+makefile.puts "distclean:"
  250
+makefile.puts ""
  251
+makefile.close
  252
+
  253
+update_lib() #set file locations in the ruby files
  254
+
  255
+puts "A summary of your settings:"
  256
+puts ""
  257
+puts "Using the following locations for install:"
  258
+puts "* Executables: #{$PREFIX}#{$BINDIR}"
  259
+puts "* Localization files: #{$PREFIX}#{$LOCALE}"
  260
+puts "* Icon file: #{$PREFIX}#{$ICONDIR}"
  261
+puts "* Desktop file: #{$PREFIX}#{$DESKTOP}"
  262
+puts "* Ruby library: #{$PREFIX}#{$RUBYDIR}"
  263
+puts ""
  264
+
  265
+if $GTK2 == true; puts "Gtk2 frontend will be installed" end
  266
+if $CLI == true; puts "Cli frontend will be installed" end
  267
+unless $LANG.empty?; puts "Languages to be installed: #{$LANG.join(', ')}" end
  268
+
  269
+puts ""
  270
+puts "You can now run make install"
  271
+puts "Make sure you've got the writing privileges"
  272
+puts ""
4  projects/slack-utils/src/slack-utils.rb
@@ -3,6 +3,10 @@
3 3
 # updated for args - Tue Mar 23 14:54:19 CDT 2010
4 4
 # Copyright 2009, 2010 Vincent Batts, http://hashbangbash.com/
5 5
 
  6
+ENV['LC_ALL'] = nil if not ENV['LC_ALL'].nil?
  7
+ENV['LC_LANG'] = nil if not ENV['LC_LANG'].nil?
  8
+ENV['LC_COLLATE'] = nil if not ENV['LC_COLLATE'].nil?
  9
+
6 10
 # Variables
7 11
 @pd = '/var/log/packages'
8 12
 @pa = Dir.entries(@pd)
15  rubyripper/README
... ...
@@ -0,0 +1,15 @@
  1
+Rubyripper is a secure audio ripper which aims to deliver high quality rips
  2
+from audio cd's to your computer drive. It tries to do so by ripping the same
  3
+track with cdparanoia multiple times and then comparing the results.
  4
+It currently has a gtk2 and a command-line interface.
  5
+
  6
+Rubyripper has the optional dependencies:
  7
+
  8
+* In SBo:
  9
+** ruby-gtk2 (for gtk2 gui, use env GTK2=true)
  10
+** cd-discid (for proper freedb support)
  11
+** lame (if the codec is wanted)
  12
+** vorbisgain, mp3gain (for replaygain support)
  13
+* NOT in SBo:
  14
+** wavgain (for replaygain support)
  15
+** ruby-gettext (for translations)
BIN  rubyripper/configure.patch.gz
Binary file not shown
87  rubyripper/rubyripper.SlackBuild
... ...
@@ -0,0 +1,87 @@
  1
+#!/bin/sh
  2
+
  3
+# Slackware build script for rubyripper
  4
+# Written 2009, by Grigorios Bouzakis (grbzks@gmail.com)
  5
+# Updated 2010, by Vincent Batts (vbatts@hashbangbash.com)
  6
+
  7
+PRGNAM=rubyripper
  8
+VERSION=${VERSION:-0.6.0}
  9
+BUILD=${BUILD:-1}
  10
+TAG=${TAG:-_SBo}
  11
+
  12
+# Automatically determine the architecture we're building on:
  13
+if [ -z "$ARCH" ]; then
  14
+  case "$( uname -m )" in
  15
+    i?86) ARCH=i486 ;;
  16
+    arm*) ARCH=arm ;;
  17
+    # Unless $ARCH is already set, use uname -m for all other archs:
  18
+       *) ARCH=$( uname -m ) ;;
  19
+  esac
  20
+fi
  21
+
  22
+CWD=$(pwd)
  23
+TMP=${TMP:-/tmp/SBo}
  24
+PKG=$TMP/package-$PRGNAM
  25
+OUTPUT=${OUTPUT:-/tmp}
  26
+
  27
+GTK2=${GTK2:-false}
  28
+
  29
+if [ "$ARCH" = "i486" ]; then
  30
+  LIBDIRSUFFIX=""
  31
+elif [ "$ARCH" = "i686" ]; then
  32
+  LIBDIRSUFFIX=""
  33
+elif [ "$ARCH" = "x86_64" ]; then
  34
+  LIBDIRSUFFIX="64"
  35
+fi
  36
+
  37
+if [ "${GTK2}" = "true" ] ; then
  38
+	GTK_ARGS="--enable-gtk2"
  39
+fi
  40
+
  41
+DOCS="GPL-3.txt README"
  42
+
  43
+set -e
  44
+
  45
+rm -rf $PKG
  46
+mkdir -p $TMP $PKG $OUTPUT
  47
+cd $TMP
  48
+rm -rf $PRGNAM-$VERSION
  49
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  50
+cd $PRGNAM-$VERSION
  51
+chown -R root:root .
  52
+find . \
  53
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  54
+ -exec chmod 755 {} \; -o \
  55
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  56
+ -exec chmod 644 {} \;
  57
+
  58
+# we should patch this regardless, because if 'gtk2' is present
  59
+# it will fail the build
  60
+zcat ${CWD}/configure.patch.gz | patch configure
  61
+
  62
+./configure \
  63
+  --prefix=/usr \
  64
+  ${GTK_ARGS} \
  65
+  --libdir=/usr/lib${LIBDIRSUFFIX} \
  66
+  --enable-cli
  67
+
  68
+make
  69
+make install DESTDIR=$PKG
  70
+
  71
+( cd $PKG
  72
+  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
  73
+    xargs strip --strip-unneeded 2> /dev/null || true
  74
+  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
  75
+    xargs strip --strip-unneeded 2> /dev/null || true
  76
+)
  77
+
  78
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  79
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
  80
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  81
+
  82
+mkdir -p $PKG/install
  83
+cat $CWD/slack-desc > $PKG/install/slack-desc
  84
+
  85
+cd $PKG
  86
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-${BUILD}${TAG}.${PKGTYPE:-tgz}
  87
+
10  rubyripper/rubyripper.info
... ...
@@ -0,0 +1,10 @@
  1
+PRGNAM="rubyripper"
  2
+VERSION="0.6.0"
  3
+HOMEPAGE="http://code.google.com/p/rubyripper/"
  4
+DOWNLOAD="http://rubyripper.googlecode.com/files/rubyripper-0.6.0.tar.bz2"
  5
+MD5SUM="5493856f60f18a6f0d338de92c6180a0"
  6
+DOWNLOAD_x86_64=""
  7
+MD5SUM_x86_64=""
  8
+MAINTAINER="Vincent Batts"
  9
+EMAIL="vbatts@hashbangbash.com"
  10
+APPROVED=""
19  rubyripper/slack-desc
... ...
@@ -0,0 +1,19 @@
  1
+# HOW TO EDIT THIS FILE:
  2
+# The "handy ruler" below makes it easier to edit a package description.  Line
  3
+# up the first '|' above the ':' following the base package name, and the '|'
  4
+# on the right side marks the last column you can put a character in.  You must
  5
+# make exactly 11 lines for the formatting to be correct.  It's also
  6
+# customary to leave one space after the ':'.
  7
+
  8
+          |-----handy-ruler------------------------------------------------------|
  9
+rubyripper: rubyripper (secure audio disk ripper)
  10
+rubyripper: 
  11
+rubyripper: Rubyripper aims to deliver high quality rips from audio cd's to 
  12
+rubyripper: yourcomputer drive. It tries to do so by ripping the same track
  13
+rubyripper: with cdparanoia multiple times and then comparing the results.
  14
+rubyripper: It currently has a gtk2 and a command-line interface.
  15
+rubyripper: 
  16
+rubyripper: Homepage:  http://code.google.com/p/rubyripper/
  17
+rubyripper: 
  18
+rubyripper: 
  19
+rubyripper: 

0 notes on commit bc2325a

Please sign in to comment.
Something went wrong with that request. Please try again.