contrib/razor.spec
author J. Ali Harlow <ali@juiblex.co.uk>
Fri Oct 03 15:05:33 2014 +0100 (2014-10-03)
changeset 453 1fd1d221092d
parent 242 f2218527ad4a
permissions -rw-r--r--
Add INTLLIBS back into librazor_la_LIBADD and also into razor.pc

INTLLIBS was originally added into librazor_la_LIBADD (but not razor.pc)
in 611c84a3f4b4538a65d186050608c17adbf17770 and then removed in
236cfc8ecc5c66288e41bf9b72051a3b18326e1c over concerns that it meant
that building static applications (eg., in plover) required a static
version of libintl. Since then, however, the inclusion of gnulib's
getopt has caused the build to fail without INTLLIBS in librazor_la_LIBADD
with messages of the form:

../gl/.libs/libgnu.a(getopt.o): In function `_getopt_internal_r':
/home/ali/wk/razor/vpath/gl/../../working/gl/getopt.c:808: undefined reference to `libintl_gettext'

while building librazor.dll.a

Thus it appears that INTLLIBS really is needed and should go back into
librazor_la_LIBADD (which fixes the build) and should also be in Libs.private
in razor.pc for static builds. This means that a static version of libintl
will be required (eg., as part of mingw64-gettext-static).

Along the way, razor.pc has also been fixed to avoid overlinking
(https://wiki.openmandriva.org/en/Overlinking_issues_in_packaging)
and a missing include directory that caused the razor executable to
fail to build was added.
     1 Summary:   Razor is a package management system replacing rpm and yum
     2 Name:      razor
     3 Version:   0.1
     4 Release:   0.1%{?dist}
     5 License:   GPLv2+
     6 Group:     System Environment/Libraries
     7 URL:       http://github.com/krh/razor/wikis
     8 Source0:   http://people.freedesktop.org/~krh/releases/%{name}-%{version}.tar.gz
     9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
    10 
    11 Requires: expat
    12 Requires: rpm-libs
    13 
    14 BuildRequires: expat-devel
    15 BuildRequires: libtool
    16 BuildRequires: gettext
    17 BuildRequires: libcurl-devel
    18 BuildRequires: rpm-devel
    19 BuildRequires: zlib-devel
    20 BuildRequires: perl(XML::Parser)
    21 
    22 %description
    23 Razor is a package management system replacing rpm and yum.
    24 Razor implements management of packages installed on the system,
    25 dependency solving, and upgrading in a small compact code base with
    26 minimal dependencies.
    27 
    28 %package libs
    29 Summary: Libraries for accessing razor
    30 Group: Development/Libraries
    31 Requires: expat >= %{dbus_version}
    32 Requires: %{name} = %{version}-%{release}
    33 
    34 %description libs
    35 Libraries for accessing razor.
    36 
    37 %package devel
    38 Summary: Libraries and headers for razor
    39 Group: Development/Libraries
    40 Requires: %{name} = %{version}-%{release}
    41 Requires: pkgconfig
    42 Requires: libcurl-devel
    43 Requires: rpm-devel
    44 Requires: zlib-devel
    45 
    46 %description devel
    47 Headers and libraries for razor.
    48 
    49 %prep
    50 %setup -q
    51 
    52 %build
    53 %configure
    54 
    55 make %{?_smp_mflags}
    56 
    57 %install
    58 rm -rf $RPM_BUILD_ROOT
    59 make install DESTDIR=$RPM_BUILD_ROOT
    60 
    61 rm -f $RPM_BUILD_ROOT%{_libdir}/librazor*.a
    62 rm -f $RPM_BUILD_ROOT%{_libdir}/librazor*.la
    63 
    64 #%find_lang %name
    65 
    66 %clean
    67 rm -rf $RPM_BUILD_ROOT
    68 
    69 %post libs -p /sbin/ldconfig
    70 
    71 %postun libs -p /sbin/ldconfig
    72 
    73 %files
    74 # -f %{name}.lang
    75 %defattr(-,root,root,-)
    76 %doc README AUTHORS NEWS COPYING
    77 %dir %{_datadir}/doc/razor
    78 %doc %{_datadir}/doc/razor/*.txt
    79 %config %{_sysconfdir}/bash_completion.d/*.sh
    80 %{_bindir}/razor
    81 %exclude %{_libdir}/librazor*.so.*
    82 
    83 %files libs
    84 %defattr(-,root,root,-)
    85 %doc README AUTHORS NEWS COPYING
    86 %{_libdir}/*razor*.so.*
    87 
    88 %files devel
    89 %defattr(-,root,root,-)
    90 
    91 %{_libdir}/lib*.so
    92 %{_libdir}/pkgconfig/*
    93 %{_includedir}/*
    94 
    95 %changelog
    96 * Mon Jun 16 2008 Richard Hughes <richard@hughsie.com> 0.1-0.1
    97 - Initial version
    98