1
0
forked from pool/libxkbcommon

remove /pkg/ indirection; remove semicolons at EOL; trim idempotent %if blocks

OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/libxkbcommon?expand=0&rev=38
This commit is contained in:
Jan Engelhardt 2017-10-19 06:51:16 +00:00 committed by Git OBS Bridge
parent e71f75b2be
commit c6099636df

View File

@ -15,13 +15,13 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
%if ! 0%{?suse_version} || 0%{?suse_version} >= 1315 %if ! 0%{?suse_version} || 0%{?suse_version} >= 1315
%bcond_without x11 %bcond_without x11
%else %else
%bcond_with x11 %bcond_with x11
%endif %endif
Name: libxkbcommon Name: libxkbcommon
Version: 0.7.2 Version: 0.7.2
Release: 0 Release: 0
@ -96,7 +96,6 @@ Wayland and kmscon.
This package contains the development headers for the library found This package contains the development headers for the library found
in libxkbcommon. in libxkbcommon.
%if %{with x11}
%package x11-devel %package x11-devel
Summary: Development files for the libxkbcommon-x11 library Summary: Development files for the libxkbcommon-x11 library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -109,27 +108,26 @@ users make sense of their keyboard input.
This package contains the development headers for the library found This package contains the development headers for the library found
in %name-x11-0. in %name-x11-0.
%endif
%prep %prep
%setup -q %setup -q
%build %build
if [ ! -e configure ]; then if [ ! -e configure ]; then
NOCONFIGURE=1 ./autogen.sh; NOCONFIGURE=1 ./autogen.sh
fi; fi
%if %{with x11} %if %{with x11}
extra_opts=--enable-x11 extra_opts=--enable-x11
%else %else
extra_opts=--disable-x11 extra_opts=--disable-x11
%endif %endif
# Ensure people will use pkgconfig to locate headers. # Ensure people will use pkgconfig to locate headers.
%configure --disable-static --includedir="%_includedir/pkg/%name" $extra_opts %configure --disable-static --includedir="%_includedir/%name" $extra_opts
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
%install %install
make install DESTDIR="%buildroot"; %make_install
rm -f "%buildroot/%_libdir"/*.la; rm -f "%buildroot/%_libdir"/*.la
%post -n libxkbcommon0 -p /sbin/ldconfig %post -n libxkbcommon0 -p /sbin/ldconfig
%postun -n libxkbcommon0 -p /sbin/ldconfig %postun -n libxkbcommon0 -p /sbin/ldconfig
@ -144,9 +142,9 @@ rm -f "%buildroot/%_libdir"/*.la;
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE NEWS %doc LICENSE NEWS
%_includedir/pkg/ %_includedir/%name/
%if %{with x11} %if %{with x11}
%exclude %_includedir/pkg/%name/xkbcommon/xkbcommon-x11.h %exclude %_includedir/%name/xkbcommon/xkbcommon-x11.h
%endif %endif
%_libdir/libxkbcommon.so %_libdir/libxkbcommon.so
%_libdir/pkgconfig/xkbcommon.pc %_libdir/pkgconfig/xkbcommon.pc
@ -156,16 +154,13 @@ rm -f "%buildroot/%_libdir"/*.la;
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE NEWS %doc LICENSE NEWS
%_libdir/libxkbcommon-x11.so.* %_libdir/libxkbcommon-x11.so.*
%endif
%if %{with x11}
%files x11-devel %files x11-devel
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE NEWS %doc LICENSE NEWS
%dir %_includedir/pkg %dir %_includedir/%name
%dir %_includedir/pkg/%name %dir %_includedir/%name/xkbcommon
%dir %_includedir/pkg/%name/xkbcommon %_includedir/%name/xkbcommon/xkbcommon-x11.h
%_includedir/pkg/%name/xkbcommon/xkbcommon-x11.h
%_libdir/libxkbcommon-x11.so %_libdir/libxkbcommon-x11.so
%_libdir/pkgconfig/xkbcommon-x11.pc %_libdir/pkgconfig/xkbcommon-x11.pc
%endif %endif