[SCM] Video extraction utility for YouTube, Google Video and other video sites (Debian packaging) branch, master, updated. upstream/2.1.7-214-g6762190
legatvs
legatvs at gmail.com
Wed Apr 1 14:44:37 UTC 2009
The following commit has been merged in the master branch:
commit 8c4e2994e3a2cc76d7bbeb27cdc0a1d09e30c3fe
Author: legatvs <legatvs at gmail.com>
Date: Mon Jan 26 11:48:09 2009 +0200
Added rudimentary (GNU) Makefile. Removed genman (use "make man").
diff --git a/CHANGES b/CHANGES
index 136b624..658c4e7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ Version 2.1.4
* Fixed progressbar time => string conversion
Developer-visible changes:
+ * Updated INSTALL
+ * removed genman (obsoleted by "make man")
+ * Added a rudimentary (GNU) Makefile
* Cleaned up: embed url => video page url
diff --git a/INSTALL b/INSTALL
index 5a5ab0e..3194a74 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,50 +1,73 @@
-Prerequisites
-------------------------------------------------------------------------------
-* Perl >= 5.8 (http://perl.org)
+ clive installation
-If a module is listed as "opt." (optional), meaning that clive runs without
-the module but the features depending on that module are disabled.
+Normally you can do "make install. This will install the clive in your own
+~/bin/ directory. If you want to do a global install, you can do (as root):
-* Config::Tiny/2.12 * BerkeleyDB/0.34
-* WWW::Curl/4.05 * URI::Escape/3.29
-* HTML::TokeParser/2.37 * XML::Simple/2.18
-* Clipboard/0.09 (opt.) * IO::Pager/0.05 (opt.)
-* Expect/1.21 (opt.)
+ # make prefix=/usr install
+
+The manual page is installed by default, if you do not need it:
+
+ # make WITH_MAN=no install
+
+When you uninstall, be sure to use the same prefix. For example:
+
+ # make prefix=/usr uninstall
+
+clive requires several Perl modules to be installed. There is a rudimentary
+way to check whether these are available in your system:
+
+ # make checkmods
+
+Developers may also find the following make target useful:
+
+ man # generate clive.1 from clive (req. pod2man)
-Most distros should have the above versions available as packages.
-If not, you can still use CPAN to install the missing modules, e.g.:
- % cpan install WWW::Curl # as root
+ clive prerequisites
-Installation
-------------------------------------------------------------------------------
+Earlier versions may or may not work.
-Extract:
- % tar xvjf clive-$release.tar.bz2
- % cd clive-$release
+- Perl >= 5.8
+- Config::Tiny (2.12+)
+- WWW::Curl (4.05+)
+- HTML::TokeParser (2.37+)
+- BerkeleyDB (0.34+)
+- URI::Escape (3.29+)
+- XML::Simple (2.18+)
-Run:
- % ./clive [option]... [URL]...
+Optional mods, meaning that clive runs without them but some features will
+be disabled:
+- Clipboard (0.09+)
+- IO::Pager (0.05+)
+- Expect (1.21+)
-Getting started:
- % ./clive --manual
+Note that you can install these modules from CPAN, typically (as root):
- The manual page is written in Perl Pod markup language and it is embedded
- in the script file. See "perldoc perlpod" for more info. For example:
- % pod2man clive > clive.1
- Or:
- % ./genman # Same as above but with suitable options
+ # cpan install $modulename
-See also:
- configrc file for an example of a configuration file.
+Although many distros have made them available as packages.
-Installation: FreeBSD
-------------------------------------------------------------------------------
+ Getting started with clive
+
+Typical use:
+
+ % clive "http://youtube.com/watch?v=3HD220e0bx4"
+
+Be sure to read the manual page which can also be accessed with:
+
+ % clive --manual
+
+See also the ./configrc file.
+
+
+ Installation: FreeBSD
+
+Global installation (as root):
+ # gmake prefix=/usr/local man1dir=/usr/local/man install
From the Ports:
----------------
* lang/perl5.8
* databases/p5-BerkeleyDB
@@ -85,11 +108,7 @@ around this:
% cpan install WWW::Curl # as root
-Installation: Debian/Ubuntu et al
-------------------------------------------------------------------------------
-
-NOTE: This section is likely to be inaccurate. It is likely that these distros
-have the clive package available anyway.
+ Installation: Debian based systems
From apt: # Typically: "sudo apt-get install $package"
* libcurl4-openssl-dev # Required to build WWW::Curl 4.05 using CPAN
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..698d801
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,89 @@
+SHELL = /bin/sh
+
+prefix = $(HOME)
+bindir = $(prefix)/bin
+datarootdir = $(prefix)/share
+datadir = $(datarootdir)
+mandir = $(datarootdir)/man
+man1dir = $(mandir)/man1
+
+INSTALL = install
+RM = rm -f
+PERL = perl
+POD2MAN = pod2man
+AWK = awk
+TR = tr
+
+WITH_MAN = yes
+
+ifndef V
+QUIET_POD2MAN = @echo ' ' POD2MAN clive.1;
+endif
+
+.PHONY: all
+all:
+
+m_URIEscape := \
+ $(shell sh -c "$(PERL) -MURI::Escape -e 1 2>/dev/null || \
+ echo 'no'")
+m_XMLSimple := \
+ $(shell sh -c "$(PERL) -MXML::Simple -e 1 2>/dev/null || \
+ echo 'no'")
+m_WWWCurl := \
+ $(shell sh -c "$(PERL) -e 'use WWW::Curl 4.05' 2>/dev/null || \
+ echo 'no'")
+m_HTMLTokeParser:= \
+ $(shell sh -c "$(PERL) -MHTML::TokeParser -e 1 2>/dev/null || \
+ echo 'no'")
+m_ConfigTiny := \
+ $(shell sh -c "$(PERL) -MConfig::Tiny -e 1 2>/dev/null || \
+ echo 'no'")
+m_BerkeleyDB := \
+ $(shell sh -c "$(PERL) -MBerkeleyDB -e 1 2>/dev/null || \
+ echo 'no'")
+
+RELEASE := \
+ $(shell sh -c "$(AWK) '/constant VERSION/ {print \$$5}' clive | \
+ $(TR) -d '[\";]'")
+
+.PHONY: checkmods install uninstall
+checkmods:
+ @echo checking...
+ifeq ($(m_URIEscape),no)
+ @echo URI::Escape module not found
+endif
+ifeq ($(m_XMLSimple),no)
+ @echo XML::Simple module not found
+endif
+ifeq ($(m_WWWCurl),no)
+ @echo WWW::Curl (4.05+) module not found
+endif
+ifeq ($(m_HTMLTokeParser),no)
+ @echo HTML::TokeParser module not found
+endif
+ifeq ($(m_ConfigTiny),no)
+ @echo Config::Tiny module not found
+endif
+ifeq ($(m_BerkeleyDB),no)
+ @echo BerkeleyDB module not found
+endif
+ @echo done.
+
+install:
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -C clive $(DESTDIR)$(bindir)/clive
+ifeq ($(WITH_MAN),yes)
+ $(INSTALL) -d $(DESTDIR)$(mandir)
+ $(INSTALL) -C -m 444 clive.1 $(DESTDIR)$(man1dir)/clive.1
+endif
+
+uninstall:
+ $(RM) $(DESTDIR)$(bindir)/clive
+ifeq ($(WITH_MAN),yes)
+ $(RM) $(DESTDIR)$(man1dir)/clive.1
+endif
+
+.PHONY: man
+man:
+ $(QUIET_POD2MAN)$(POD2MAN) -c "clive manual" -n clive \
+ -s 1 -r $(RELEASE) clive clive.1
diff --git a/genman b/genman
deleted file mode 100755
index 27c221a..0000000
--- a/genman
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env perl
-
-use warnings;
-use strict;
-
-open(my $fh, "<", "clive") or die "error: clive: $!";
-
-my $re = qr|VERSION.+=> "(.*?)"|;
-my $release;
-
-while ( <$fh> ) {
- if ( $_ =~ /$re/ ) {
- $release = $1;
- last;
- }
-}
-
-close($fh);
-
-print STDERR "error: release string not found\n" and exit
- unless $release;
-
-print "generating clive.1 ...\n";
-system(qq/pod2man -c "clive Manual" -n clive /
- . qq/-s 1 -r $release clive > clive.1/);
-
-#system("gzip clive.1");
--
Video extraction utility for YouTube, Google Video and other video sites (Debian packaging)
More information about the Pkg-perl-cvs-commits
mailing list