#
# Fink package definition
# Written by Chris Dolan (up to 1.6.3)
# Tweaked by Alexis Wilke (since 1.7.0)
#
# Copyright (c) 2002-2009 Made to Order Software Corp.
#

Package: sswf
Version: <VERSION>
Revision: <REVISION>
# Am I the one releasing the packages?
# I only have g++ 3.3
#GCC: 3.3
Maintainer: Alexis Wilke <alexis@m2osw.com>
Depends: %N-shlibs (= %v-%r)
BuildDepends: bison (>= 1.35), libjpeg, freetype2 (>= 2.1.2), libiconv-dev
BuildDependsOnly: True

# I will use the following to handle beta versions
# (at this time, 1.7.5 is a beta version)
#Source:  ftp://ftp.m2osw.com/sswf/beta/%n-%v-src.tar.gz
#Source2: ftp://ftp.m2osw.com/sswf/beta/%n-%v-doc.tar.gz

Source:  mirror:sourceforge:%n/%n-%v-src.tar.gz
Source2: mirror:sourceforge:%n/%n-%v-doc.tar.gz

Source-MD5: <SRCMD5>
Source2-MD5: <DOCMD5>


# To generate a patch:
# 1) use the command line:
#	diff -Naur sswf-<version>-original sswf-<version> >%f.patch
# 2) place the result in the same directory as this .info file
# 3) uncomment the Patch: %f.patch line below
#Patch: %f.patch
SourceDirectory: %n-%v
DocFiles: <DOCFILES>
ConfigureParams: --mandir=%i/share/man --disable-dependency-tracking
#CompileScript: <<
#  configure prefix=%p
#  make
#<<
InstallScript: <<
  make install prefix=%i
  mkdir -p %i/share/doc/%N
  mv %i/share/%N/html %i/share/doc/%N/html
<<
#InstallScript: <<
#  make install prefix=%i
#  rm -f bin/ft2sswf
#  mv %i/lib/libsswf.dylib %i/lib/libsswf.%v.dylib
#  mv %i/doc %i/share
#  mv %i/share/doc/%N-%v %i/share/doc/%N
#  mv %i/include/sswf/scripts %i/share/doc/%N
#  ln -s libsswf.%v.dylib %i/lib/libsswf.1.dylib
#  ln -s libsswf.1.dylib %i/lib/libsswf.dylib
#<<
SplitOff: <<
  Package: %N-shlibs
  #Depends: libjpeg, zlib, freetype2 (>= 2.1.2)
  # It seems that zlib is now part of the Apple setup and
  # thus not a requirement in fink packages.
  Depends: libjpeg-shlibs, freetype2-shlibs (>= 2.1.2), libiconv
  Files: lib/*.dylib
  Shlibs: <<
    %p/lib/libsswf-%v.*.*.*.dylib      2.0.0 %n (>= 1.7.5-6)
    %p/lib/libsswf_c-%v.*.*.*.dylib    2.0.0 %n (>= 1.7.5-6)
    %p/lib/libsswf_as-%v.*.*.*.dylib   2.0.0 %n (>= 1.7.5-6)
    %p/lib/libsswf_asas-%v.*.*.*.dylib 2.0.0 %n (>= 1.7.5-6)
  <<
  DocFiles: doc/LICENSE.txt
  Description: Shared libraries for SSWF and its ActionScript compiler
<<
SplitOff2: <<
  Package: %N-bin
  Depends: %N-shlibs (= %v-%r)
  Files: bin share/man
  DocFiles: doc/LICENSE.txt
  Description: SSWF tools: compiler, decompiler, jpeg to Flash, font convertor
<<
SplitOff3: <<
  Package: %N-docs
  # Do we need dependencies here?! Probably not since you can
  # read the docs without having the binaries/libraries/etc.
  #Depends: %N-shlibs (= %v-%r)
  Files: share/doc/%N
  # Avoid duplicating the license...
  #DocFiles: doc/LICENSE.txt
  Description: SSWF libraries, tools and also Flash documentation
<<
# According to the policy, we cannot have a -dev + -bin packages
#SplitOff4: <<
#  Package: %N-dev
#  Depends: %N-shlibs (= %v-%r)
#  BuildDependsOnly: True
#  # The following will break whenever the library version goes to more than
#  # one digit but I'm not too sure how to do better with glob patterns...
#  Files: <<
#    include lib/libsswf.a lib/libsswf.dylib lib/libsswf.la
#    lib/libsswf_as.a lib/libsswf_as.dylib lib/libsswf_as.la
#    lib/libsswf_asas.a lib/libsswf_asas.dylib lib/libsswf_asas.la
#  <<
#  DocFiles: doc/LICENSE.txt
#  Description: Header files, static libraries and dynamic library links
#<<
Description: Library/tools for creating Flash movies
DescPort: <<
  Fink bison version 1.29 won't work with this package.

  OSX 10.3 comes with version 1.35 which is what will be required by
  default.

  First ported to Mac OS/X by Chris Dolan.
<<
# The license is really MIT, but Fink only accepts a set of licenses
# and they decided that BSD would mean any BSD license or the MIT license
License: BSD
Homepage: http://sswf.sourceforge.net/
