-
Notifications
You must be signed in to change notification settings - Fork 0
/
legovid2dvd.spec
146 lines (132 loc) · 4.81 KB
/
legovid2dvd.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Name: legovid2dvd
Version: 0.0.4
Release: 1%{?dist}
Summary: LEGO® video downloader and DVD authoring tool
Group: Applications/Internet
License: GPLv2
URL: https://github.com/bdperkin/%{name}
Source0: https://github.com/bdperkin/%{name}/sources/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: asciidoc
BuildRequires: docbook-style-xsl
BuildRequires: /usr/bin/groff
BuildRequires: libxslt
BuildRequires: pandoc
BuildRequires: /usr/bin/perltidy
BuildRequires: /usr/bin/podchecker
BuildRequires: w3m
Requires: /usr/bin/cp
Requires: /usr/bin/diff
Requires: /usr/bin/dvdauthor
Requires: /usr/bin/ffmpeg
Requires: /usr/bin/ffprobe
Requires: /usr/bin/find
Requires: /usr/bin/fuseiso
Requires: /usr/bin/fusermount
Requires: /usr/bin/genisoimage
Requires: /usr/bin/grep
Requires: /usr/bin/mkdir
Requires: /usr/bin/mountpoint
Requires: /usr/bin/mplayer
Requires: /usr/bin/mplex
Requires: /usr/bin/normalize
Requires: /usr/bin/perl
Requires: /usr/bin/perldoc
Requires: /usr/bin/rm
Requires: /usr/bin/touch
Requires: coreutils
Requires: diffutils
Requires: dvdauthor
Requires: ffmpeg
Requires: findutils
Requires: fuse
Requires: fuseiso
Requires: genisoimage
Requires: grep
Requires: mjpegtools
Requires: mplayer
Requires: normalize
Requires: perl
Requires: perl(File::Compare)
Requires: perl(File::Find::Rule)
Requires: perl(File::LibMagic)
Requires: perl(File::Path)
Requires: perl(Getopt::Long)
Requires: perl(IO::Select)
Requires: perl(IPC::Open3)
Requires: perl(strict)
Requires: perl(URI::Split)
Requires: perl(warnings)
Requires: perl(WWW::Curl::Easy)
Requires: perl(XML::XPath)
Requires: perl-File-Find-Rule
Requires: perl-File-LibMagic
Requires: perl-File-Path
Requires: perl-Getopt-Long
Requires: perl-Pod-Perldoc
Requires: perl-URI
Requires: perl-WWW-Curl
Requires: perl-XML-XPath
Requires: rpmfusion-free-release
Requires: util-linux
%define NameUpper %{expand:%%(echo %{name} | tr [:lower:] [:upper:])}
%define NameMixed %{expand:%%(echo %{name} | %{__sed} -e "s/\\([a-z]\\)\\([a-zA-Z0-9]*\\)/\\u\\1\\2/g")}
%define NameLower %{expand:%%(echo %{name} | tr [:upper:] [:lower:])}
%define Year %{expand:%%(date "+%Y")}
%define DocFiles ACKNOWLEDGEMENTS AUTHOR AUTHORS AVAILABILITY BUGS CAVEATS COPYING COPYRIGHT DESCRIPTION LICENSE NAME NOTES OPTIONS OUTPUT README.md RESOURCES SYNOPSIS
%define SubFiles %{name} %{name}.1.asciidoc %{DocFiles} man.asciidoc
%define DocFormats chunked htmlhelp manpage text xhtml
%description
Perl script to download LEGO® videos, convert them, and author a DVD.
%prep
%setup -q
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%build
%{__cp} %{name}.pl %{name}
%{__sed} -i -e s/%{NAME}/%{name}/g %{SubFiles}
%{__sed} -i -e s/%{NAMEUPPER}/%{NameUpper}/g %{SubFiles}
%{__sed} -i -e s/%{NAMEMIXED}/%{NameMixed}/g %{SubFiles}
%{__sed} -i -e s/%{NAMELOWER}/%{NameLower}/g %{SubFiles}
%{__sed} -i -e s/%{VERSION}/%{version}/g %{SubFiles}
%{__sed} -i -e s/%{RELEASE}/%{release}/g %{SubFiles}
%{__sed} -i -e s/%{YEAR}/%{Year}/g %{SubFiles}
for f in %{DocFormats}; do %{__mkdir_p} $f; a2x -D $f -d manpage -f $f %{name}.1.asciidoc; done
groff -e -mandoc -Tascii manpage/%{name}.1 > manpage/%{name}.1.groff
%{__mkdir_p} pod
./groff2pod.pl manpage/%{name}.1.groff pod/%{name}.1.pod
podchecker pod/%{name}.1.pod
cat pod/%{name}.1.pod >> %{name}
perltidy -b %{name}
podchecker %{name}
pandoc -f html -t markdown -s -o README.md.pandoc xhtml/%{name}.1.html
cat README.md.pandoc | %{__grep} -v ^% | %{__sed} -e 's/\*\*/\*/g' | %{__sed} -e 's/^\ \*/\n\ \*/g' | %{__sed} -e 's/\[\*/\[\ \*/g' | %{__sed} -e 's/\*\]/\*\ \]/g' | %{__sed} -e 's/{\*/{\ \*/g' | %{__sed} -e 's/\*}/\*\ }/g' | %{__sed} -e 's/|\*/|\ \*/g' | %{__sed} -e 's/\*|/\*\ |/g' | %{__sed} -e 's/=\*/=\ \*/g' | %{__sed} -e 's/\*=/\*\ =/g' > README.md
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{_mandir}/man1
%{__install} %{name} %{buildroot}%{_bindir}
%{__gzip} -c manpage/%{name}.1 > %{buildroot}/%{_mandir}/man1/%{name}.1.gz
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%doc %{DocFiles}
%doc %{DocFormats} pod
%doc %{_mandir}/man1/%{name}.1.gz
%changelog
* Mon Apr 21 2014 Brandon Perkins <[email protected]> 0.0.4-1
- Generating ISOs. ([email protected])
- DVD Authoring ([email protected])
- Make command paths explicit, and add dependency requirements to the RPM spec.
* Tue Apr 15 2014 Brandon Perkins <[email protected]> 0.0.3-1
- Normalization of PCM audio. ([email protected])
- add or update closing side comments after closing BLOCK brace
- cuddled else; use this style: '} else {' ([email protected])
- add newlines; ok to introduce new line breaks ([email protected])
- File conversions. ([email protected])
- Much better checking of data ([email protected])
- Add docs. ([email protected])
* Tue Apr 08 2014 Brandon Perkins <[email protected]> 0.0.2-1
- new package built with tito