Import new package spec for introduction into repository.

Sun, 11 Jan 2009 00:48:38 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 11 Jan 2009 00:48:38 +0100
changeset 67
ce0d31e18b66
parent 66
ffb537ebcb0a
child 68
49e9fb8edd05

Import new package spec for introduction into repository.

libgdiplus/libgdiplus.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libgdiplus/libgdiplus.spec	Sun Jan 11 00:48:38 2009 +0100
     1.3 @@ -0,0 +1,146 @@
     1.4 +##
     1.5 +##  libgdiplus.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package information
    1.28 +Name:         libgdiplus
    1.29 +Summary:      Unix GDI+ Development API
    1.30 +URL:          http://www.mono-project.com/Libgdiplus
    1.31 +Packager:     Michael Schloh von Bennewitz
    1.32 +Distribution: Europalab Production
    1.33 +Class:        EVAL
    1.34 +Group:        XWindow
    1.35 +License:      MIT X11
    1.36 +Version:      2.0
    1.37 +Release:      20090106
    1.38 +
    1.39 +#   build options
    1.40 +%option       with_shared  no
    1.41 +
    1.42 +#   list of sources
    1.43 +Source0:      ftp://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-%{version}.tar.bz2
    1.44 +
    1.45 +#   build information
    1.46 +Prefix:       %{l_prefix}
    1.47 +BuildRoot:    %{l_buildroot}
    1.48 +BuildPreReq:  OpenPKG, openpkg >= 20040130, zlib, glib2, X11, xrender
    1.49 +BuildPreReq:  cairo, fontconfig, freetype, giflib, jpeg, png, tiff
    1.50 +PreReq:       OpenPKG, openpkg >= 20040130, zlib, glib2, X11, xrender
    1.51 +PreReq:       cairo, fontconfig, freetype, giflib, jpeg, png, tiff
    1.52 +AutoReq:      no
    1.53 +AutoReqProv:  no
    1.54 +Conflicts:    pnet
    1.55 +
    1.56 +%description
    1.57 +    The Graphics Device Interface Plus (GDI+) development API exposes
    1.58 +    abstract graphics and formatted text logic. The calling process
    1.59 +    may write to those devices for which the GDI+ has a device driver,
    1.60 +    such as a video display or printer.
    1.61 +
    1.62 +%track
    1.63 +    prog libgdiplus = {
    1.64 +        version   = %{version}
    1.65 +        url       = ftp://ftp.novell.com/pub/mono/sources/libgdiplus/
    1.66 +        regex     = libgdiplus-(\d+\.\d+)\.tar\.bz2
    1.67 +    }
    1.68 +
    1.69 +%prep
    1.70 +    #   unpack sources
    1.71 +    %setup -q
    1.72 +
    1.73 +    #   remove subdirectory builds to assure internal library usage
    1.74 +    rm -rf cairo
    1.75 +
    1.76 +    #   correct flaws in the build configuration
    1.77 +    %{l_shtool} subst \
    1.78 +        -e 's;\(libexif_pkgconfig=\)\("No\.[^"]*"\);\1no \&\& echo \2;g' \
    1.79 +        configure
    1.80 +    %{l_shtool} subst \
    1.81 +        -e 's;^\(SUBDIRS\) *= *@CAIRO_DIR@ src tests;\1=src tests;' \
    1.82 +        Makefile.in
    1.83 +
    1.84 +%build
    1.85 +    #   detect X11 paths
    1.86 +    x11_incdir=`%{l_rc} --query x11_incdir`
    1.87 +    x11_libdir=`%{l_rc} --query x11_libdir`
    1.88 +
    1.89 +%if "%{with_shared}" == "yes"
    1.90 +    #   configure shared library
    1.91 +    CC="%{l_cc}" \
    1.92 +    CFLAGS="%{l_cflags -O}" \
    1.93 +    CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \
    1.94 +    LDFLAGS="%{l_ldflags}" \
    1.95 +    ./configure \
    1.96 +        --prefix=%{l_prefix} \
    1.97 +        --with-cairo=installed \
    1.98 +        --without-libexif \
    1.99 +        --disable-static \
   1.100 +        --enable-shared \
   1.101 +        --with-gnu-ld
   1.102 +
   1.103 +    #   build shared library
   1.104 +    %{l_make} %{l_mflags -O}
   1.105 +
   1.106 +    #   install early, as we delete to build again
   1.107 +    %{l_shtool} mkdir -f -p -m 755 gdidyn
   1.108 +    mv src/.libs/libgdiplus* gdidyn/
   1.109 +
   1.110 +    #   reset build configuration
   1.111 +    %{l_make} %{l_mflags} distclean
   1.112 +%endif
   1.113 +
   1.114 +    #   configure static library
   1.115 +    CC="%{l_cc}" \
   1.116 +    CFLAGS="%{l_cflags -O}" \
   1.117 +    CPPFLAGS="%{l_cppflags tiff} -I${x11_incdir}" \
   1.118 +    LDFLAGS="%{l_ldflags}" \
   1.119 +    ./configure \
   1.120 +        --prefix=%{l_prefix} \
   1.121 +        --with-cairo=installed \
   1.122 +        --without-libexif \
   1.123 +        --enable-static \
   1.124 +        --disable-shared \
   1.125 +        --with-gnu-ld
   1.126 +
   1.127 +    #   build static library
   1.128 +    %{l_make} %{l_mflags -O}
   1.129 +
   1.130 +%install
   1.131 +    #   install static library
   1.132 +    rm -rf $RPM_BUILD_ROOT
   1.133 +    %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
   1.134 +
   1.135 +%if "%{with_shared}" == "yes"
   1.136 +    #   install shared library
   1.137 +    %{l_tar} cf - gdidyn | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib
   1.138 +%endif
   1.139 +
   1.140 +    #   determine installation files
   1.141 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.142 +        %{l_files_std} \
   1.143 +        '%not %dir %{l_prefix}/lib/pkgconfig'
   1.144 +
   1.145 +%files -f files
   1.146 +
   1.147 +%clean
   1.148 +    rm -rf $RPM_BUILD_ROOT
   1.149 +

mercurial