|
| 1 | +%define libname libevdevxx |
| 2 | +%define devname libevdevxx-devel |
| 3 | +%define staticname libevdevxx-static-devel |
| 4 | +%define toolsname evdevxx-tools |
| 5 | + |
| 6 | +Name: libevdevxx |
| 7 | +Version: 0.5.2 |
| 8 | +Release: 1%{?dist} |
| 9 | +Summary: A C++ wrapper for libevdev. |
| 10 | +Group: System/Libraries |
| 11 | +License: MIT |
| 12 | +URL: https://github.com/dkosmari/libevdevxx |
| 13 | +Source0: https://github.com/dkosmari/libevdevxx/releases/download/v%{version}/%{name}-%{version}.tar.gz |
| 14 | + |
| 15 | +%description |
| 16 | +This is the library needed to run programs linked with %{name}. |
| 17 | + |
| 18 | +BuildRequires: automake |
| 19 | +BuildRequires: libtool |
| 20 | +BuildRequires: pkgconfig(libevdev) |
| 21 | +BuildRequires: gcc-c++ |
| 22 | +BuildRequires: doxygen |
| 23 | + |
| 24 | + |
| 25 | +############# |
| 26 | +## library ## |
| 27 | +############# |
| 28 | + |
| 29 | + |
| 30 | +########### |
| 31 | +## devel ## |
| 32 | +########### |
| 33 | + |
| 34 | +%package -n %{devname} |
| 35 | +Summary: Development package for %{libname}. |
| 36 | +Group: Development/C++ |
| 37 | +Provides: %{devname} = %{version} |
| 38 | +Requires: %{libname} = %{version}-%{release} |
| 39 | + |
| 40 | +%description -n %{devname} |
| 41 | +This package provides libraries and headers files for %{name} |
| 42 | +development. |
| 43 | + |
| 44 | + |
| 45 | +################## |
| 46 | +## static-devel ## |
| 47 | +################## |
| 48 | + |
| 49 | +%package -n %{staticname} |
| 50 | +Summary: Development package for %{libname}, with static linking. |
| 51 | +Group: Development/C++ |
| 52 | +Provides: %{staticname} = %{version} |
| 53 | + |
| 54 | +%description -n %{staticname} |
| 55 | +This package provides static libraries for %{name} development. |
| 56 | + |
| 57 | + |
| 58 | +########### |
| 59 | +## tools ## |
| 60 | +########### |
| 61 | + |
| 62 | +%package -n %{toolsname} |
| 63 | +Summary: Tools from the %{name} package. |
| 64 | +Requires: %{libname} = %{version}-%{release} |
| 65 | + |
| 66 | +%description -n %{toolsname} |
| 67 | +This package contains tools from %{name}: |
| 68 | +- evdevxx-query |
| 69 | +- evdevxx-read |
| 70 | + |
| 71 | + |
| 72 | +########### |
| 73 | +## build ## |
| 74 | +########### |
| 75 | + |
| 76 | +%prep |
| 77 | +%autosetup |
| 78 | + |
| 79 | +%build |
| 80 | +%configure --disable-examples --enable-docs --enable-tools |
| 81 | +%make_build |
| 82 | + |
| 83 | +%install |
| 84 | +%make_install |
| 85 | + |
| 86 | + |
| 87 | +##################### |
| 88 | +## package library ## |
| 89 | +##################### |
| 90 | + |
| 91 | +%files -n %{libname} |
| 92 | +%license COPYING |
| 93 | +%doc AUTHORS |
| 94 | +%{_libdir}/*.so.* |
| 95 | + |
| 96 | + |
| 97 | +################### |
| 98 | +## package devel ## |
| 99 | +################### |
| 100 | + |
| 101 | +%files -n %{devname} |
| 102 | +%doc README.md |
| 103 | +%{_pkgdocdir}/html |
| 104 | +%{_includedir}/libevdevxx/* |
| 105 | +%{_libdir}/*.so |
| 106 | +%{_libdir}/pkgconfig/libevdevxx.pc |
| 107 | + |
| 108 | + |
| 109 | +########################## |
| 110 | +## package static-devel ## |
| 111 | +########################## |
| 112 | + |
| 113 | +%files -n %{staticname} |
| 114 | +%doc README.md |
| 115 | +%{_pkgdocdir}/html |
| 116 | +%{_includedir}/libevdevxx/* |
| 117 | +%{_libdir}/*.a |
| 118 | +%{_libdir}/pkgconfig/libevdevxx.pc |
| 119 | + |
| 120 | + |
| 121 | +################### |
| 122 | +## package tools ## |
| 123 | +################### |
| 124 | + |
| 125 | +%files -n %{toolsname} |
| 126 | +%{_bindir}/evdevxx-* |
0 commit comments