specs/SUNWlibical.spec
author Jon Tibble <meths@btinternet.com>
Sat Oct 06 16:11:50 2012 +0100 (2012-10-06)
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 17937 664c0536875a
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca
     1 #
     2 # spec file for package SUNWlibical.spec
     3 #
     4 # Copyright (c) 2008 Sun Microsystems, Inc.
     5 # This file and all modifications and additions to the pristine
     6 # package are under the same license as the package itself.
     7 #
     8 %define owner jedy
     9 #
    10 
    11 %define OSR 10376:0.x
    12 
    13 %include Solaris.inc
    14 
    15 Name:                   SUNWlibical
    16 IPS_package_name:       library/libical
    17 Meta(info.classification): %{classification_prefix}:Desktop (GNOME)/Libraries
    18 License:                LGPL v2.1
    19 Group:                  System/Libraries
    20 Summary:                Libical is an Open Source implementation of the IETF's iCalendar Calendaring and Scheduling protocols
    21 Version:                0.44
    22 URL:                    http://sourceforge.net/projects/freeassociation/
    23 Distribution:           Java Desktop System
    24 Vendor:                 Sourceforge
    25 Source:                 http://downloads.sourceforge.net/freeassociation/libical-%{version}.tar.gz
    26 Source1:		%{name}-manpages-0.1.tar.gz
    27 #owner:fujiwara date:2008-12-12 type:bug bugster:6783979 bugid:2417984
    28 Patch1:                 libical-01-g11n-strstriplt-utf8.diff
    29 SUNW_BaseDir:           %{_basedir}
    30 SUNW_Copyright:         %{name}.copyright
    31 BuildRoot:              %{_tmppath}/%{name}-%{version}-build
    32 
    33 %include default-depend.inc
    34 Requires:               SUNWperl510core
    35 BuildRequires:          SUNWperl510usr
    36 BuildRequires:          SUNWcmake 
    37 
    38 %package devel
    39 Summary:                 %{summary} - development files
    40 SUNW_BaseDir:            %{_prefix}
    41 %include default-depend.inc
    42 Requires:                %{name}
    43 
    44 %prep
    45 %setup -q -n libical-%{version}
    46 %patch1 -p1
    47 
    48 cd %{_builddir}/libical-%version
    49 gzcat %SOURCE1 | tar xf -
    50 
    51 
    52 %build
    53 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
    54 if test "x$CPUS" = "x" -o $CPUS = 0; then
    55     CPUS=1
    56 fi
    57 
    58 %if %debug_build
    59 %define build_type Debug
    60 %else
    61 %define build_type Release
    62 %endif
    63 
    64 mkdir build && cd build
    65 export CFLAGS="%optflags"
    66 export LDFLAGS="%_ldflags"
    67 export LD_LIBRARY_PATH="%_pkg_config_path"
    68 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=%{build_type} \
    69 		-DBUILD_SHARED_LIBS=On -DICAL_ERRORS_ARE_FATAL=false \
    70 		-DLIB_INSTALL_DIR=%{_libdir} ..
    71 make
    72 
    73 %ifarch amd64 sparcv9
    74 mkdir ../build-%{_arch64} && cd ../build-%{_arch64}
    75 export CFLAGS="%optflags64"
    76 export LDFLAGS="%_ldflags"
    77 export LD_LIBRARY_PATH=%{_libdir}/%{_arch64}/pkgconfig
    78 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=%{build_type} \
    79 		-DBUILD_SHARED_LIBS=On -DICAL_ERRORS_ARE_FATAL=false \
    80 		-DLIB_INSTALL_DIR=%{_libdir}/%{_arch64} ..
    81 make
    82 %endif
    83 
    84 %install
    85 rm -rf $RPM_BUILD_ROOT
    86 cd build
    87 make install DESTDIR=$RPM_BUILD_ROOT
    88 %ifarch amd64 sparcv9
    89 cd ../build-%{_arch64}
    90 make install DESTDIR=$RPM_BUILD_ROOT
    91 %endif
    92 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
    93 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'
    94 
    95 cd %{_builddir}/libical-%version/sun-manpages
    96 make install DESTDIR=$RPM_BUILD_ROOT
    97 
    98 %clean
    99 rm -rf $RPM_BUILD_ROOT
   100 
   101 %files
   102 %doc(bzip2) THANKS
   103 %doc(bzip2) COPYING
   104 %doc(bzip2) LICENSE
   105 %doc(bzip2) README
   106 %defattr(-, root, bin)
   107 %dir %attr (0755, root, sys) %{_datadir}
   108 %dir %attr(0755, root, bin) %{_mandir}
   109 %dir %attr(0755, root, bin) %{_mandir}/man3
   110 %{_mandir}/man3/*
   111 %dir %attr (0755, root, other) %{_docdir}
   112 %dir %attr (0755,root,bin) %{_libdir}
   113 %{_libdir}/lib*.so*
   114 %ifarch amd64 sparcv9
   115 %dir %attr (0755,root,bin) %{_libdir}/%{_arch64}
   116 %{_libdir}/%{_arch64}/lib*.so*
   117 %endif
   118 
   119 %files devel
   120 %defattr (-, root, bin)
   121 %dir %attr(0755, root, bin) %{_includedir}
   122 %{_includedir}/*
   123 %dir %attr (0755, root, bin) %{_libdir}
   124 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
   125 %{_libdir}/pkgconfig/*
   126 %ifarch amd64 sparcv9
   127 %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
   128 %{_libdir}/%{_arch64}/pkgconfig/*
   129 %endif
   130 
   131 %changelog
   132 * Tue Dec 22 2009 - jedy.wang@sun.com
   133 - Bump to 0.44.
   134 - Remove *.a and *.la.
   135 * Tue Jan 15 2009 - jedy.wang@sun.com
   136 - Set default dir/file attribute for base pkg to correct invalid owner issue.
   137 * Tue Jan 13 2009 - jedy.wang@sun.com
   138 - Bump to 0.43.
   139 * Sun Jan 11 2009 - dave.lin@sun.com
   140 - Change to depend on SUNWcmake instead of SFEcmake.
   141 * Mon Jan 05 2009 - jedy.wang@sun.com
   142 - Add manpage.
   143 * Fri Dec 12 2008 - takao.fujiwara@sun.com
   144 - Add g11n-strstriplt-utf8.diff to work strstrip with UTF-8.
   145 * Thu Nov  27 2008 - jedy.wang@sun.com
   146 - Bump to 0.42.
   147 - Add %attr to _datadir and _docdir to fix build.
   148 * Tue Nov  13 2008 - jedy.wang@sun.com
   149 - Move from sfe to spec-files.
   150 * Tue Nov  11 2008 - jedy.wang@sun.com
   151 - Bump to 0.4.1.
   152 * Thu Oct  30 2008 - jedy.wang@sun.com
   153 - Bump to 0.4.0.
   154 - Use cmake to build.
   155 - Add patch 01-build.diff.
   156 * Mon Jan  21 2008 - moinak.ghosh@sun.com
   157 - Initial spec.