-
Notifications
You must be signed in to change notification settings - Fork 52
/
mkspec.pl
executable file
·49 lines (38 loc) · 1.01 KB
/
mkspec.pl
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/");