|
| 1 | +%define libname %mklibname evdevxx |
| 2 | +%define devname %mklibname evdevxx -d |
| 3 | +%define staticname %mklibname evdevxx -d -s |
| 4 | +%define toolsname evdevxx-tools |
| 5 | + |
| 6 | +Name: libevdevxx |
| 7 | +Version: 0.5.2 |
| 8 | +Release: %mkrel 1 |
| 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 | +%package -n %{libname} |
| 30 | +Summary: A C++ wrapper for libevdev. |
| 31 | +Group: System/Libraries |
| 32 | + |
| 33 | +%description -n %{libname} |
| 34 | +This is the library needed to run programs linked with %{libname}. |
| 35 | + |
| 36 | + |
| 37 | +########### |
| 38 | +## devel ## |
| 39 | +########### |
| 40 | + |
| 41 | +%package -n %{devname} |
| 42 | +Summary: Development package for %{libname}. |
| 43 | +Group: Development/C++ |
| 44 | +Provides: %{devname} = %{version} |
| 45 | +Requires: %{libname} = %{version}-%{release} |
| 46 | + |
| 47 | +%description -n %{devname} |
| 48 | +This package provides libraries and headers files for %{name} |
| 49 | +development. |
| 50 | + |
| 51 | + |
| 52 | +################## |
| 53 | +## static-devel ## |
| 54 | +################## |
| 55 | + |
| 56 | +%package -n %{staticname} |
| 57 | +Summary: Development package for %{libname}, with static linking. |
| 58 | +Group: Development/C++ |
| 59 | +Provides: %{staticname} = %{version} |
| 60 | + |
| 61 | +%description -n %{staticname} |
| 62 | +This package provides static libraries for %{name} development. |
| 63 | + |
| 64 | + |
| 65 | +########### |
| 66 | +## tools ## |
| 67 | +########### |
| 68 | + |
| 69 | +%package -n %{toolsname} |
| 70 | +Summary: Tools from the %{name} package. |
| 71 | +Requires: %{libname} = %{version}-%{release} |
| 72 | + |
| 73 | +%description -n %{toolsname} |
| 74 | +This package contains tools from %{name}: |
| 75 | +- evdevxx-query |
| 76 | +- evdevxx-read |
| 77 | + |
| 78 | + |
| 79 | +########### |
| 80 | +## build ## |
| 81 | +########### |
| 82 | + |
| 83 | +%prep |
| 84 | +%autosetup |
| 85 | + |
| 86 | +%build |
| 87 | +%configure --disable-examples --enable-docs --enable-tools |
| 88 | +%make_build |
| 89 | + |
| 90 | +%install |
| 91 | +%make_install |
| 92 | + |
| 93 | + |
| 94 | +##################### |
| 95 | +## package library ## |
| 96 | +##################### |
| 97 | + |
| 98 | +%files -n %{libname} |
| 99 | +%license COPYING |
| 100 | +%doc AUTHORS |
| 101 | +%{_libdir}/*.so.* |
| 102 | + |
| 103 | + |
| 104 | +################### |
| 105 | +## package devel ## |
| 106 | +################### |
| 107 | + |
| 108 | +%files -n %{devname} |
| 109 | +%doc README.md |
| 110 | +%{_pkgdocdir}/html |
| 111 | +%{_includedir}/libevdevxx/* |
| 112 | +%{_libdir}/*.so |
| 113 | +%{_libdir}/pkgconfig/libevdevxx.pc |
| 114 | + |
| 115 | + |
| 116 | +########################## |
| 117 | +## package static-devel ## |
| 118 | +########################## |
| 119 | + |
| 120 | +%files -n %{staticname} |
| 121 | +%doc README.md |
| 122 | +%{_pkgdocdir}/html |
| 123 | +%{_includedir}/libevdevxx/* |
| 124 | +%{_libdir}/*.a |
| 125 | +%{_libdir}/pkgconfig/libevdevxx.pc |
| 126 | + |
| 127 | + |
| 128 | +################### |
| 129 | +## package tools ## |
| 130 | +################### |
| 131 | + |
| 132 | +%files -n evdevxx-tools |
| 133 | +%{_bindir}/evdevxx-* |
0 commit comments