/[packages]/cauldron/osmo-sdr/current/SPECS/osmo-sdr.spec
ViewVC logotype

Contents of /cauldron/osmo-sdr/current/SPECS/osmo-sdr.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 810878 - (show annotations) (download)
Thu Jan 15 22:22:58 2015 UTC (9 years, 3 months ago) by barjac
File size: 2787 byte(s)
Import new package based on suse/fedora spec with thanks
1 %define build_docs 1
2 %define major 0
3 %define libname %mklibname %{name} %{major}
4 %define devname %mklibname %{name} -d
5 %define tarname libosmosdr
6
7 Name: osmo-sdr
8 Version: 0.1.20131117
9 Release: %mkrel 1
10 Summary: Support programs for OsmoSDR
11 License: GPLv2
12 Group: Communications/Radio
13 URL: http://cgit.osmocom.org/osmo-sdr/
14 Source: %{tarname}-%{version}.tar.gz
15
16 BuildRequires: cmake
17 BuildRequires: pkgconfig(libusb)
18
19 %if %{build_docs}
20 BuildRequires: doxygen
21 BuildRequires: texlive-texmf
22 BuildRequires: graphviz
23 %endif
24
25 %description
26 Programs to control OsmoSDR, the E4000 based software defined radio receiver.
27
28 %package -n %{libname}
29 Summary: SDR driver for OsmoSDR
30
31 %description -n %{libname}
32 Library to run OsmoSDR, the E4000 based software defined radio receiver.
33
34 %package -n %{devname}
35 Summary: Development files for osmo-sdr
36 Requires: %{name} = %{version}-%{release}
37 Requires: %{libname} = %{version}-%{release}
38 Provides: %{name}-devel = %{version}-%{release}
39 Provides: %{tarname}-devel = %{version}-%{release}
40
41 %description -n %{devname}
42 Library headers for osmo-sdr driver.
43
44 %package devel-doc
45 Summary: Documentation for osmo-sdr
46 Group: Development/Libraries/Other
47 Requires: %{name}-devel = %{version}-%{release}
48 BuildArch: noarch
49
50 %description devel-doc
51 Documentation for osmo-sdr driver.
52
53 %prep
54 %setup -q -n %{tarname}
55
56 # remove buildtime from documentation
57 sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' Doxyfile.in
58
59 %build
60 %cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DINSTALL_UDEV_RULES=ON ../
61 %make
62 cd ..
63
64 #create documentation
65 %if %{build_docs}
66 cp Doxyfile.in Doxyfile
67 sed -i "s\@VERSION@\%{version}\1" Doxyfile
68 doxygen
69 cd doc/latex
70 make pdf
71 %endif
72
73 %install
74 cd build
75 make DESTDIR=%{buildroot} install
76 rm %{buildroot}%{_libdir}/libosmosdr.a
77 %ifarch x86_64
78 mv %{buildroot}/usr/lib/pkgconfig %{buildroot}%{_libdir}
79 %endif
80 cd ..
81
82 #move/reanme udev rules
83 mkdir -p %{buildroot}%{_udevrulesdir}
84 mv %{buildroot}%{_sysconfdir}/udev/rules.d/osmosdr.rules %{buildroot}%{_udevrulesdir}/10-osmosdr.rules
85
86 #install documentation
87 %if %{build_docs}
88 mkdir -p %{buildroot}%{_docdir}/%{name}/pdf
89 cp -r doc/html %{buildroot}%{_docdir}/%{name}
90 cp -r doc/latex/*.pdf %{buildroot}%{_docdir}/%{name}/pdf
91 %endif
92
93 %files
94 %doc AUTHORS COPYING README
95 %if %{build_docs}
96 %exclude %{_docdir}/%{name}/html
97 %exclude %{_docdir}/%{name}/pdf
98 %endif
99 %{_bindir}/osmo_sdr
100 %{_udevrulesdir}/10-osmosdr.rules
101
102 %files -n %{libname}
103 %{_libdir}/libosmosdr.so.%{major}*
104
105 %files -n %{devname}
106 %{_libdir}/libosmosdr.so
107 %{_includedir}/*.h
108 %{_libdir}/pkgconfig/libosmosdr.pc
109
110 %if %{build_docs}
111 %files devel-doc
112 %{_docdir}/%{name}/html
113 %{_docdir}/%{name}/pdf
114 %endif

  ViewVC Help
Powered by ViewVC 1.1.30