File youtube-dl.spec of Package youtube-dl
#
# spec file for package youtube-dl
#
# Copyright (c) 2018 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: 2018.09.08
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: https://github.com/rg3/youtube-dl
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
BuildRequires: zip
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 -q -n %name
rm -f youtube-dl
%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
make %{?_smp_mflags}
%install
%make_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