add %bcond_with x to build for X
[platform/upstream/libXdmcp.git] / packaging / libXdmcp.spec
index 1cfa470..0d9553d 100644 (file)
@@ -1,16 +1,23 @@
+%bcond_with x
+
 Name:           libXdmcp
 Version:        1.1.1
 Release:        1
 License:        MIT
 Summary:        X Display Manager Control Protocol library
 Url:            http://www.x.org
-Group:          System Environment/Libraries
+Group:          Graphics/X Window System
 
 Source:         %{name}-%{version}.tar.bz2
+Source1001:    libXdmcp.manifest
 
 BuildRequires:  pkgconfig(xorg-macros)
 BuildRequires:  pkgconfig(xproto)
 
+%if !%{with x}
+ExclusiveArch:
+%endif
+
 %description
 X Display Manager Control Protocol library.
 
@@ -18,42 +25,37 @@ X Display Manager Control Protocol library.
 Summary:        Development files for %{name}
 Group:          Development/Libraries
 Requires:       %{name} = %{version}
-Provides:       libxdmcp-devel
 
 %description devel
 libXdmcp development package.
 
 %prep
 %setup -q
+cp %{SOURCE1001} .
 
 %build
-%reconfigure --disable-static \
-           LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+%reconfigure --disable-static 
 make %{?_smp_mflags}
 
 %install
-
-make install DESTDIR=%{buildroot} INSTALL="install -p"
-
-# We intentionally don't ship *.la files
-rm -f %{buildroot}%{_libdir}/*.la
-
-# manual fixup later
-rm -rf %{buildroot}%{_docdir}
+%make_install
 
 %remove_docs
 
 %post -p /sbin/ldconfig
+
 %postun -p /sbin/ldconfig
 
 %files
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING ChangeLog Wraphelp.README.crypto
+%license COPYING 
 %{_libdir}/libXdmcp.so.6
 %{_libdir}/libXdmcp.so.6.0.0
 
 %files devel
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_includedir}/X11/Xdmcp.h
 %{_libdir}/libXdmcp.so
-%{_libdir}/pkgconfig/xdmcp.p
+%{_libdir}/pkgconfig/xdmcp.pc