File: mkspec.pl

package info (click to toggle)
swh-plugins 0.4.15%2B1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,776 kB
  • ctags: 23,450
  • sloc: ansic: 71,958; xml: 12,248; sh: 11,689; perl: 768; makefile: 180; sed: 16
file content (49 lines) | stat: -rwxr-xr-x 1,036 bytes parent folder | download | duplicates (8)
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
#!/usr/bin/perl -w

$package = shift(@ARGV);
$version = shift(@ARGV);
@files = @ARGV;

open(OUT, ">swh-plugins-$version.spec") || die "Can't create spec file: $!";

print OUT <<EOB;
Summary: A set of audio plugins for LADSPA.
Name: $package
Version: $version
Release: 1
Copyright: GPL
Group: Applications/Multimedia
Source: http://plugin.org.uk/releases/$version/$package-$version.tar.gz
BuildRoot: /var/tmp/%{name}-buildroot
Prefix: /usr/local

%description
A set of audio plugins for LADSPA (see http://plugin.org.uk/ for more
details).

%prep
rm -rf \$RPM_BUILD_ROOT/$package-$version
tar xvfz /usr/src/redhat/SOURCES/$package-$version.tar.gz

%build
cd $package-$version
./configure
make static

%install
cd $package-$version
make INSTALL_ROOT="\$RPM_BUILD_ROOT" install

%clean
rm -rf \$RPM_BUILD_ROOT

%files
%defattr(-,root,root)

EOB
for $file (@files) {
        print OUT "%{prefix}/lib/ladspa/$file\n";
}
print OUT "%{prefix}/share/ladspa/rdf/swh-plugins.rdf";

system("cp $package-$version.tar.gz /usr/src/redhat/SOURCES/");