-
Notifications
You must be signed in to change notification settings - Fork 24
/
libvirt-java.spec.in
93 lines (77 loc) · 2.37 KB
/
libvirt-java.spec.in
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
Summary: Java bindings for the libvirt virtualization API
Name: libvirt-java
Version: @version@
Prefix: libvirt
Release: @release@%{?dist}%{?extra_release}
License: MIT
BuildArch: noarch
Group: Development/Libraries
Source: https://download.libvirt.org/java/%{name}-%{version}.tar.gz
URL: https://libvirt.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: jna
Requires: libvirt-client >= @libvirt.required@
%if 0%{?fedora} >= 21
Requires: java-headless >= @java.required@
%else
Requires: java >= @java.required@
%endif
Requires: jpackage-utils
BuildRequires: ant
BuildRequires: jna
%if 0%{?rhel} < 8
BuildRequires: ant-junit
%endif
BuildRequires: java-devel >= @java.required@
BuildRequires: jpackage-utils
#
# the jpackage-utils should provide a %{java_home} macro
# to select a different Java JVM from the default one use the following
# rpmbuild --define 'java_home /usr/lib/jvm/your_jvm_of_choice'
#
%description
Libvirt-java is a base framework allowing to use libvirt, the virtualization
API though the Java programming language.
It requires libvirt-client >= @libvirt.required@
%package devel
Summary: Compressed Java source files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Libvirt-java is a base framework allowing to use libvirt, the virtualization
API though the Java programming language. This is the development part needed
to build applications with Libvirt-java.
%package javadoc
Summary: Java documentation for %{name}
Group: Development/Documentation
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%build
ant build jar docs
%install
rm -fr %{buildroot}
install -d -m0755 %{buildroot}%{_javadir}
install -d -m0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp target/%{prefix}-%{version}.jar %{buildroot}%{_javadir}/%{prefix}.jar
cp -r target/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__ln_s} %{_javadocdir}/%{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%check
%if 0%{?rhel} < 8
ant test
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS LICENSE NEWS README INSTALL
%{_javadir}/*.jar
%files devel
%defattr(-,root,root)
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog