]> git.pld-linux.org Git - packages/openvr.git/blob - openvr.spec
699407672f946c8470e27316973652f148453ccf
[packages/openvr.git] / openvr.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 #
5 Summary:        OpenVR SDK - API and runtime that allows access to VR hardware
6 Summary(pl.UTF-8):      OpenVR SDK - API i biblioteka uruchomieniowa pozwalająca na dostęp do sprzętu VR
7 Name:           openvr
8 Version:        1.23.8
9 Release:        1
10 License:        BSD
11 Group:          Libraries
12 #Source0Download: https://github.com/ValveSoftware/openvr/tags
13 Source0:        https://github.com/ValveSoftware/openvr/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  2dd6945040b63c9a2d1ce4ece00bda7e
15 Patch0:         %{name}-pc.patch
16 Patch1:         %{name}-libdir.patch
17 URL:            https://github.com/ValveSoftware/openvr
18 BuildRequires:  cmake >= 2.8
19 BuildRequires:  libstdc++-devel >= 6:4.7
20 BuildRequires:  rpmbuild(macros) >= 1.605
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 OpenVR is an API and runtime that allows access to VR hardware from
25 multiple vendors without requiring that applications have specific
26 knowledge of the hardware they are targeting. This is an SDK that
27 contains the API and samples. The runtime is under SteamVR in Tools on
28 Steam.
29
30 %description -l pl.UTF-8
31 OpenVR to API i biblioteka uruchomieniowa, poozwalająca na dostęp do
32 sprzętu VR różnych producentów bez wymagania od aplikacji wiedzy o
33 sprzęcie, z jakim ma być używana. Ten pakiet zawiera API i przykłady.
34 Biblioteka uruchomieniowa jest umieszczona w StreamVR w Tools on
35 Steam.
36
37 %package devel
38 Summary:        Header files for OpenVR SDK library
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki OpenVR SDK
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42 Requires:       libstdc++-devel >= 6:4.7
43
44 %description devel
45 Header files for OpenVR SDK library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki OpenVR SDK.
49
50 %package static
51 Summary:        Static OpenVR SDK library
52 Summary(pl.UTF-8):      Statyczna biblioteka OpenVR SDK
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static OpenVR SDK library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka OpenVR SDK.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch1 -p1
66
67 # prebuilt binaries
68 %{__rm} -r bin lib
69
70 %build
71 %if %{with static_libs}
72 install -d build-static
73 cd build-static
74 %cmake .. \
75         -DINSTALL_PKGCONFIG_DIR=%{_pkgconfigdir}
76
77 %{__make}
78 cd ..
79 %endif
80
81 install -d build-shared
82 cd build-shared
83 %cmake .. \
84         -DBUILD_SHARED=ON \
85         -DINSTALL_PKGCONFIG_DIR=%{_pkgconfigdir}
86
87 %{__make}
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with static_libs}
93 %{__make} -C build-static install \
94         DESTDIR=$RPM_BUILD_ROOT
95 %endif
96
97 %{__make} -C build-shared install \
98         DESTDIR=$RPM_BUILD_ROOT
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post   -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
105
106 %files
107 %defattr(644,root,root,755)
108 %doc LICENSE README.md
109 %attr(755,root,root) %{_libdir}/libopenvr_api.so
110
111 %files devel
112 %defattr(644,root,root,755)
113 %doc src/README docs/Driver_API_Documentation.md
114 %{_includedir}/openvr
115 %{_pkgconfigdir}/openvr.pc
116
117 %if %{with static_libs}
118 %files static
119 %defattr(644,root,root,755)
120 %{_libdir}/libopenvr_api.a
121 %endif
This page took 0.040646 seconds and 2 git commands to generate.