File youtube-dl.spec of Package youtube-dl
#
# spec file for package youtube-dl
#
# Copyright (c) 2016 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/
#
Name: youtube-dl
Version: 2016.09.24
Release: 0
Summary: A tool for downloading from video sites for offline watching
License: SUSE-Public-Domain and CC-BY-SA-3.0
Group: Productivity/Networking/Web/Utilities
Url: http://rg3.github.io/youtube-dl/
#Git-Clone: git://github.com/rg3/youtube-dl
#define snapshot 1
Source: http://youtube-dl.org/downloads/%version/%name-%version.tar.gz
Source2: http://youtube-dl.org/downloads/%version/%name-%version.tar.gz.sig
Source3: %name.keyring
BuildRequires: make >= 4
BuildRequires: python-devel
BuildRequires: python-xml
%if 0%{?snapshot}
BuildRequires: pandoc
BuildRequires: zip
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
youtube-dl is a small command-line program to retrieve videos from
YouTube.com and other video sites for later watching.
%prep
%setup -qn %name
%build
perl -i -pe '
s{^PREFIX\ \?=\ /usr/local}{PREFIX ?= %_prefix};
s{^BINDIR\ \?=\ \$\(PREFIX\)/bin}{BINDIR\ \?=\ %_bindir};
s{^MANDIR\ \?=\ \$\(PREFIX\)/man}{MANDIR\ \?=\ %_mandir};
s{^SHAREDIR\ \?=\ \$\(PREFIX\)/share}{SHAREDIR\ \?=\ %_datadir};' Makefile
%if 0%{?snapshot}
make clean
make %{?_smp_mflags}
%endif
%install
make DESTDIR="%buildroot" install
%files
%defattr(-,root,root)
%doc LICENSE README.txt
%_bindir/youtube-dl
%_mandir/man1/*
%config %_sysconfdir/bash_completion.d/
%config %_sysconfdir/fish/
%config %_datadir/zsh/
%changelog