Package: libimobiledevice
# OPENSSL110 FTBFS, newer version has upstream git patches to support it
Version: 1.1.4
Revision: 12
Description: Library to talk to iDevices
License: Restrictive

# Dependencies:
BuildDependsOnly: true
Depends: %N4-shlibs (>= %v-1)
BuildDepends: pkgconfig, usbmuxd2-dev, libplist1, openssl100-dev, libxml2 (>= 2.9.1-1)

# Unpack Phase:
# Source: http://www.libimobiledevice.org/downloads/%n-%v.tar.bz2
# releases moved to github and are autogenerated tarballs there until v1.2
Source: mirror:sourceforge:fink/%n-%v.tar.bz2
Source-Checksum: SHA256(67499cfaa6172f566ee6b0783605acffe484fb7ddc3b09881ab7ac58667ee5b8)

# Upstream patches for openssl110. See:
#   02a0e03e24bc96bba2e5ea2438c30baf803fd137
#   f635812ccc9b2eb63f5bc2b494d7fdae9c9e1ef3
#   b89e4823ef9528936072f5f195d7fdab9e1f838b
# that do not apply cleanly against our older version.
Patchscript: <<
# This corrects bug #280 of the bug tracker and can be deleted, once fixed by upstream
  sed -i.bak 's|LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(|inline void debug_buffer(|g' src/debug.h
<<

ConfigureParams: LDFLAGS="-L%p/lib" CFLAGS="-I%p/include -std=gnu89" --without-cython

DocFiles: AUTHORS COPYING* NEWS README

SplitOff: <<
  Package: %N4-shlibs
  Depends: usbmuxd2-shlibs, libplist1-shlibs, openssl100-shlibs

  Files: <<
    lib/libimobiledevice.3.dylib
  <<
  Shlibs: <<
    %p/lib/libimobiledevice.3.dylib 4.0.0 %n (>= 1.1.4-2)
  <<
  DocFiles: AUTHORS COPYING* NEWS README
<<

Splitoff2: <<
  Package: %N4-dev
  Conflicts: %N-dev
  Replaces: %N-dev
  Depends: %N4-shlibs (>= %v-1)
  BuildDependsOnly: true
  Files: <<
    include
    lib
  <<
  DocFiles: AUTHORS COPYING* NEWS README docs/html
<<

# Additional Info
DescDetail: <<
libimobiledevice is a software library that talks the protocols to support
iPhone, iPod Touch, iPad and Apple TV devices.  Unlike other projects, it
does not depend on using any existing proprietary libraries and does not
require jailbreaking.  It allows other software to easily access the
device's filesystem, retrieve information about the device and it's
internals, backup/restore the device, manage SpringBoard icons, manage
installed applications, retrieve addressbook/calendars/notes and bookmarks
and synchronize music and video to the device.

See the README file for some commandline tools to access iDevices.
<<

Homepage: http://www.libimobiledevice.org/
Maintainer: Karl-Michael Schindler <karl-michael.schindler@web.de>