aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/Description.plist.in12
-rwxr-xr-xrelease/Info.plist.in44
-rwxr-xr-xrelease/License.rtf20
-rw-r--r--release/ReadMe.rtf13
-rwxr-xr-xrelease/Welcome.rtf17
-rw-r--r--release/deb-control.tmpl29
-rwxr-xr-xrelease/libjpeg-turbo.nsi.in153
-rw-r--r--release/libjpeg-turbo.spec.in150
-rwxr-xr-xrelease/makecygwinpkg.in41
-rw-r--r--release/makedpkg.in68
-rw-r--r--release/makemacpkg.in267
-rw-r--r--release/uninstall.in109
12 files changed, 923 insertions, 0 deletions
diff --git a/release/Description.plist.in b/release/Description.plist.in
new file mode 100644
index 0000000..46a5bce
--- /dev/null
+++ b/release/Description.plist.in
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IFPkgDescriptionDescription</key>
+ <string>A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs</string>
+ <key>IFPkgDescriptionTitle</key>
+ <string>@PACKAGE_NAME@</string>
+ <key>IFPkgDescriptionVersion</key>
+ <string>@VERSION@</string>
+</dict>
+</plist>
diff --git a/release/Info.plist.in b/release/Info.plist.in
new file mode 100755
index 0000000..0575079
--- /dev/null
+++ b/release/Info.plist.in
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleGetInfoString</key>
+ <string>@VERSION@, The libjpeg-turbo Project</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.libjpeg-turbo.libjpeg-turbo</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@VERSION@</string>
+ <key>IFMajorVersion</key>
+ <integer>1</integer>
+ <key>IFMinorVersion</key>
+ <integer>@BUILD@</integer>
+ <key>IFPkgFlagAllowBackRev</key>
+ <false/>
+ <key>IFPkgFlagAuthorizationAction</key>
+ <string>AdminAuthorization</string>
+ <key>IFPkgFlagBackgroundAlignment</key>
+ <string>topleft</string>
+ <key>IFPkgFlagBackgroundScaling</key>
+ <string>none</string>
+ <key>IFPkgFlagDefaultLocation</key>
+ <string>/</string>
+ <key>IFPkgFlagFollowLinks</key>
+ <true/>
+ <key>IFPkgFlagInstallFat</key>
+ <false/>
+ <key>IFPkgFlagIsRequired</key>
+ <false/>
+ <key>IFPkgFlagOverwritePermissions</key>
+ <false/>
+ <key>IFPkgFlagRelocatable</key>
+ <false/>
+ <key>IFPkgFlagRestartAction</key>
+ <string>NoRestart</string>
+ <key>IFPkgFlagRootVolumeOnly</key>
+ <true/>
+ <key>IFPkgFlagUpdateInstalledLanguages</key>
+ <false/>
+ <key>IFPkgFormatVersion</key>
+ <real>0.10000000149011612</real>
+</dict>
+</plist>
diff --git a/release/License.rtf b/release/License.rtf
new file mode 100755
index 0000000..5073a27
--- /dev/null
+++ b/release/License.rtf
@@ -0,0 +1,20 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww9820\viewh8480\viewkind0
+\deftab720
+\pard\pardeftab720
+
+\f0\fs24 \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
+\
+\pard\tx220\tx720\pardeftab720\li720\fi-720
+\ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\
+{\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\
+{\listtext \'95 }Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\
+\pard\pardeftab720\qc
+\cf0 \
+\pard\pardeftab720
+\cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
+} \ No newline at end of file
diff --git a/release/ReadMe.rtf b/release/ReadMe.rtf
new file mode 100644
index 0000000..2ae4878
--- /dev/null
+++ b/release/ReadMe.rtf
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww26380\viewh15840\viewkind0
+\deftab720
+\pard\pardeftab720\ql\qnatural
+
+\f0\fs24 \cf0 libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.\
+\
+libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.\
+\
+libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.\
+} \ No newline at end of file
diff --git a/release/Welcome.rtf b/release/Welcome.rtf
new file mode 100755
index 0000000..a570c5b
--- /dev/null
+++ b/release/Welcome.rtf
@@ -0,0 +1,17 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww9000\viewh8400\viewkind0
+\deftab720
+\pard\pardeftab720\ql\qnatural
+
+\f0\fs24 \cf0 This installer will install the libjpeg-turbo SDK and run-time libraries onto your computer so that you can use libjpeg-turbo to build new applications or accelerate existing ones. To remove the libjpeg-turbo package, run\
+\
+\pard\pardeftab720\ql\qnatural
+
+\f1 \cf0 /opt/libjpeg-turbo/bin/uninstall\
+\pard\pardeftab720\ql\qnatural
+
+\f0 \cf0 \
+from the command line.\
+} \ No newline at end of file
diff --git a/release/deb-control.tmpl b/release/deb-control.tmpl
new file mode 100644
index 0000000..18c8922
--- /dev/null
+++ b/release/deb-control.tmpl
@@ -0,0 +1,29 @@
+Package: {__PKGNAME}
+Version: {__VERSION}-{__BUILD}
+Section: misc
+Priority: optional
+Architecture: {__ARCH}
+Essential: no
+Maintainer: The libjpeg-turbo Project [http://www.libjpeg-turbo.org]
+Description: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
+ libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
+ NEON) to accelerate baseline JPEG compression and decompression on x86,
+ x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as
+ fast as libjpeg, all else being equal. On other types of systems,
+ libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue
+ of its highly-optimized Huffman coding routines. In many cases, the
+ performance of libjpeg-turbo rivals that of proprietary high-speed JPEG
+ codecs.
+ .
+ libjpeg-turbo implements both the traditional libjpeg API as well as the less
+ powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
+ colorspace extensions that allow it to compress from/decompress to 32-bit and
+ big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
+ interface.
+ .
+ libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
+ derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
+ VirtualGL projects made numerous enhancements to the codec in 2009, and in
+ early 2010, libjpeg-turbo spun off into an independent project, with the goal
+ of making high-speed JPEG compression/decompression technology available to a
+ broader range of users and developers.
diff --git a/release/libjpeg-turbo.nsi.in b/release/libjpeg-turbo.nsi.in
new file mode 100755
index 0000000..8fcd764
--- /dev/null
+++ b/release/libjpeg-turbo.nsi.in
@@ -0,0 +1,153 @@
+!include x64.nsh
+Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
+OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
+InstallDir @INST_DIR@
+
+SetCompressor bzip2
+
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
+!ifdef WIN64
+ ${If} ${RunningX64}
+ ${DisableX64FSRedirection}
+ ${Endif}
+!endif
+ SectionIn RO
+!ifdef GCC
+ IfFileExists $SYSDIR/libturbojpeg.dll exists 0
+!else
+ IfFileExists $SYSDIR/turbojpeg.dll exists 0
+!endif
+ goto notexists
+ exists:
+!ifdef GCC
+ MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed. Please uninstall it first."
+!else
+ MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ or the TurboJPEG SDK is already installed. Please uninstall it first."
+!endif
+ quit
+
+ notexists:
+ SetOutPath $SYSDIR
+!ifdef GCC
+ File "@CMAKE_BINARY_DIR@\libturbojpeg.dll"
+!else
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.dll"
+!endif
+ SetOutPath $INSTDIR\bin
+!ifdef GCC
+ File "/oname=libjpeg-@DLL_VERSION@.dll" "@CMAKE_BINARY_DIR@\sharedlib\libjpeg-*.dll"
+!else
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll"
+!endif
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}cjpeg.exe"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}djpeg.exe"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpegtran.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}tjbench.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe"
+ SetOutPath $INSTDIR\lib
+!ifdef GCC
+ File "@CMAKE_BINARY_DIR@\libturbojpeg.dll.a"
+ File "@CMAKE_BINARY_DIR@\libturbojpeg.a"
+ File "@CMAKE_BINARY_DIR@\sharedlib\libjpeg.dll.a"
+ File "@CMAKE_BINARY_DIR@\libjpeg.a"
+!else
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.lib"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg.lib"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}jpeg-static.lib"
+!endif
+!ifdef JAVA
+ SetOutPath $INSTDIR\classes
+ File "@CMAKE_BINARY_DIR@\java\${BUILDDIR}turbojpeg.jar"
+!endif
+ SetOutPath $INSTDIR\include
+ File "@CMAKE_BINARY_DIR@\jconfig.h"
+ File "@CMAKE_SOURCE_DIR@\jerror.h"
+ File "@CMAKE_SOURCE_DIR@\jmorecfg.h"
+ File "@CMAKE_SOURCE_DIR@\jpeglib.h"
+ File "@CMAKE_SOURCE_DIR@\turbojpeg.h"
+ SetOutPath $INSTDIR\doc
+ File "@CMAKE_SOURCE_DIR@\README"
+ File "@CMAKE_SOURCE_DIR@\README-turbo.txt"
+ File "@CMAKE_SOURCE_DIR@\example.c"
+ File "@CMAKE_SOURCE_DIR@\libjpeg.txt"
+ File "@CMAKE_SOURCE_DIR@\structure.txt"
+ File "@CMAKE_SOURCE_DIR@\usage.txt"
+ File "@CMAKE_SOURCE_DIR@\wizard.txt"
+
+ WriteRegStr HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" "Install_Dir" "$INSTDIR"
+
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoRepair" 1
+ WriteUninstaller "uninstall_@VERSION@.exe"
+SectionEnd
+
+Section "Uninstall"
+!ifdef WIN64
+ ${If} ${RunningX64}
+ ${DisableX64FSRedirection}
+ ${Endif}
+!endif
+
+ SetShellVarContext all
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@"
+ DeleteRegKey HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@"
+
+!ifdef GCC
+ Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
+ Delete $SYSDIR\libturbojpeg.dll
+ Delete $INSTDIR\lib\libturbojpeg.dll.a"
+ Delete $INSTDIR\lib\libturbojpeg.a"
+ Delete $INSTDIR\lib\libjpeg.dll.a"
+ Delete $INSTDIR\lib\libjpeg.a"
+!else
+ Delete $INSTDIR\bin\jpeg@DLL_VERSION@.dll
+ Delete $SYSDIR\turbojpeg.dll
+ Delete $INSTDIR\lib\jpeg.lib
+ Delete $INSTDIR\lib\jpeg-static.lib
+ Delete $INSTDIR\lib\turbojpeg.lib
+ Delete $INSTDIR\lib\turbojpeg-static.lib
+!endif
+!ifdef JAVA
+ Delete $INSTDIR\classes\turbojpeg.jar
+!endif
+ Delete $INSTDIR\bin\cjpeg.exe
+ Delete $INSTDIR\bin\djpeg.exe
+ Delete $INSTDIR\bin\jpegtran.exe
+ Delete $INSTDIR\bin\tjbench.exe
+ Delete $INSTDIR\bin\rdjpgcom.exe
+ Delete $INSTDIR\bin\wrjpgcom.exe
+ Delete $INSTDIR\include\jconfig.h"
+ Delete $INSTDIR\include\jerror.h"
+ Delete $INSTDIR\include\jmorecfg.h"
+ Delete $INSTDIR\include\jpeglib.h"
+ Delete $INSTDIR\include\turbojpeg.h"
+ Delete $INSTDIR\uninstall_@VERSION@.exe
+ Delete $INSTDIR\doc\README
+ Delete $INSTDIR\doc\README-turbo.txt
+ Delete $INSTDIR\doc\example.c
+ Delete $INSTDIR\doc\libjpeg.txt
+ Delete $INSTDIR\doc\structure.txt
+ Delete $INSTDIR\doc\usage.txt
+ Delete $INSTDIR\doc\wizard.txt
+
+ RMDir "$INSTDIR\include"
+ RMDir "$INSTDIR\lib"
+ RMDir "$INSTDIR\doc"
+!ifdef JAVA
+ RMDir "$INSTDIR\classes"
+!endif
+ RMDir "$INSTDIR\bin"
+ RMDir "$INSTDIR"
+
+SectionEnd
diff --git a/release/libjpeg-turbo.spec.in b/release/libjpeg-turbo.spec.in
new file mode 100644
index 0000000..6c97814
--- /dev/null
+++ b/release/libjpeg-turbo.spec.in
@@ -0,0 +1,150 @@
+# Path under which libjpeg-turbo should be installed
+%define _prefix %{__prefix}
+
+# Path under which executables should be installed
+%define _bindir %{__bindir}
+
+# Path under which Java classes and man pages should be installed
+%define _datadir %{__datadir}
+
+# Path under which docs should be installed
+%define _docdir %{_defaultdocdir}/%{name}-%{version}
+
+# Path under which headers should be installed
+%define _includedir %{__includedir}
+
+# _libdir is set to %{_prefix}/%{_lib} by default
+%ifarch x86_64
+%define _lib lib64
+%else
+%if "%{_prefix}" == "/opt/libjpeg-turbo"
+%define _lib lib32
+%endif
+%endif
+
+# Path under which man pages should be installed
+%define _mandir %{__mandir}
+
+Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
+Name: @PKGNAME@
+Version: @VERSION@
+Vendor: The libjpeg-turbo Project
+URL: http://www.libjpeg-turbo.org
+Group: System Environment/Libraries
+#-->Source0: http://prdownloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
+Release: @BUILD@
+License: BSD-style
+BuildRoot: %{_blddir}/%{name}-buildroot-%{version}-%{release}
+Prereq: /sbin/ldconfig
+%ifarch x86_64
+Provides: %{name} = %{version}-%{release}, @PACKAGE_NAME@ = %{version}-%{release}, libturbojpeg.so()(64bit)
+%else
+Provides: %{name} = %{version}-%{release}, @PACKAGE_NAME@ = %{version}-%{release}, libturbojpeg.so
+%endif
+
+%description
+libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
+NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64,
+and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as
+libjpeg, all else being equal. On other types of systems, libjpeg-turbo can
+still outperform libjpeg by a significant amount, by virtue of its
+highly-optimized Huffman coding routines. In many cases, the performance of
+libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
+
+libjpeg-turbo implements both the traditional libjpeg API as well as the less
+powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
+colorspace extensions that allow it to compress from/decompress to 32-bit and
+big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
+interface.
+
+libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
+derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
+VirtualGL projects made numerous enhancements to the codec in 2009, and in
+early 2010, libjpeg-turbo spun off into an independent project, with the goal
+of making high-speed JPEG compression/decompression technology available to a
+broader range of users and developers.
+
+#-->%prep
+#-->%setup -q -n libjpeg-turbo-%{version}
+
+#-->%build
+#-->./configure prefix=%{_prefix} bindir=%{_bindir} datadir=%{_datadir} \
+#--> docdir=%{_docdir} includedir=%{_includedir} libdir=%{_libdir} \
+#--> mandir=%{_mandir} JPEG_LIB_VERSION=@JPEG_LIB_VERSION@ \
+#--> SO_MAJOR_VERSION=@SO_MAJOR_VERSION@ SO_MINOR_VERSION=@SO_MINOR_VERSION@ \
+#--> --with-pic @RPM_CONFIG_ARGS@
+#-->make DESTDIR=$RPM_BUILD_ROOT
+
+%install
+
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} exampledir=%{_docdir}
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
+
+#-->%if 0
+
+LJT_LIBDIR=%{__libdir}
+if [ ! "$LJT_LIBDIR" = "%{_libdir}" ]; then
+ echo ERROR: libjpeg-turbo must be configured with libdir=%{_prefix}/%{_lib} when generating an in-tree RPM for this architecture.
+ exit 1
+fi
+
+#-->%endif
+
+LJT_DOCDIR=%{__docdir}
+if [ "%{_prefix}" = "/opt/libjpeg-turbo" -a "$LJT_DOCDIR" = "/opt/libjpeg-turbo/doc" ]; then
+ ln -fs %{_docdir} $RPM_BUILD_ROOT/$LJT_DOCDIR
+fi
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}
+%doc %{_docdir}/*
+%dir %{_prefix}
+%if "%{_prefix}" == "/opt/libjpeg-turbo" && "%{_docdir}" != "%{_prefix}/doc"
+ %{_prefix}/doc
+%endif
+%dir %{_bindir}
+%{_bindir}/cjpeg
+%{_bindir}/djpeg
+%{_bindir}/jpegtran
+%{_bindir}/tjbench
+%{_bindir}/rdjpgcom
+%{_bindir}/wrjpgcom
+%dir %{_libdir}
+%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@
+%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@
+%{_libdir}/libjpeg.so
+%{_libdir}/libjpeg.a
+%{_libdir}/libturbojpeg.so.0.0.0
+%{_libdir}/libturbojpeg.so.0
+%{_libdir}/libturbojpeg.so
+%{_libdir}/libturbojpeg.a
+%dir %{_includedir}
+%{_includedir}/jconfig.h
+%{_includedir}/jerror.h
+%{_includedir}/jmorecfg.h
+%{_includedir}/jpeglib.h
+%{_includedir}/turbojpeg.h
+%dir %{_mandir}
+%dir %{_mandir}/man1
+%{_mandir}/man1/cjpeg.1*
+%{_mandir}/man1/djpeg.1*
+%{_mandir}/man1/jpegtran.1*
+%{_mandir}/man1/rdjpgcom.1*
+%{_mandir}/man1/wrjpgcom.1*
+%if "%{_prefix}" != "%{_datadir}"
+ %dir %{_datadir}
+%endif
+@JAVA_RPM_CONTENTS_1@
+@JAVA_RPM_CONTENTS_2@
+
+%changelog
diff --git a/release/makecygwinpkg.in b/release/makecygwinpkg.in
new file mode 100755
index 0000000..b35ba73
--- /dev/null
+++ b/release/makecygwinpkg.in
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+set -u
+set -e
+trap onexit INT
+trap onexit TERM
+trap onexit EXIT
+
+TMPDIR=
+
+onexit()
+{
+ if [ ! "$TMPDIR" = "" ]; then
+ rm -rf $TMPDIR
+ fi
+}
+
+PACKAGE_NAME=@PKGNAME@
+VERSION=@VERSION@
+SRCDIR=@abs_top_srcdir@
+
+PREFIX=%{__prefix}
+DOCDIR=%{__docdir}
+LIBDIR=%{__libdir}
+
+umask 022
+rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2
+TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX`
+__PWD=`pwd`
+make install DESTDIR=$TMPDIR/pkg docdir=/usr/share/doc/$PACKAGE_NAME-$VERSION \
+ exampledir=/usr/share/doc/$PACKAGE_NAME-$VERSION
+rm $TMPDIR/pkg$LIBDIR/*.la
+if [ "$PREFIX" = "/opt/libjpeg-turbo" -a "$DOCDIR" = "/opt/libjpeg-turbo/doc" ]; then
+ ln -fs /usr/share/doc/$PACKAGE_NAME-$VERSION $TMPDIR/pkg$DOCDIR
+fi
+cd $TMPDIR/pkg
+tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 *
+cd $__PWD
+mv $TMPDIR/*.tar.bz2 .
+
+exit 0
diff --git a/release/makedpkg.in b/release/makedpkg.in
new file mode 100644
index 0000000..fa6bc19
--- /dev/null
+++ b/release/makedpkg.in
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+set -u
+set -e
+trap onexit INT
+trap onexit TERM
+trap onexit EXIT
+
+TMPDIR=
+
+onexit()
+{
+ if [ ! "$TMPDIR" = "" ]; then
+ sudo rm -rf $TMPDIR
+ fi
+}
+
+makedeb()
+{
+ SUPPLEMENT=$1
+ DIRNAME=$PACKAGE_NAME
+
+ if [ $SUPPLEMENT = 1 ]; then
+ PACKAGE_NAME=$PACKAGE_NAME\32
+ DEBARCH=amd64
+ fi
+
+ umask 022
+ rm -f $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
+ TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
+ mkdir $TMPDIR/DEBIAN
+ (cat $SRCDIR/release/deb-control.tmpl | sed s/{__PKGNAME}/$PACKAGE_NAME/g \
+ | sed s/{__VERSION}/$VERSION/g | sed s/{__BUILD}/$BUILD/g \
+ | sed s/{__ARCH}/$DEBARCH/g > $TMPDIR/DEBIAN/control)
+
+ if [ $SUPPLEMENT = 1 ]; then
+ make install DESTDIR=$TMPDIR bindir=/dummy/bin datadir=/dummy/data \
+ docdir=/dummy/doc includedir=/dummy/include mandir=/dummy/man
+ rm -f $TMPDIR$LIBDIR/*.la
+ rm -rf $TMPDIR/dummy
+ else
+ make install DESTDIR=$TMPDIR docdir=/usr/share/doc/$DIRNAME-$VERSION \
+ exampledir=/usr/share/doc/$DIRNAME-$VERSION
+ rm -f $TMPDIR$LIBDIR/*.la
+ if [ "$PREFIX" = "/opt/libjpeg-turbo" -a "$DOCDIR" = "/opt/libjpeg-turbo/doc" ]; then
+ ln -fs /usr/share/doc/$DIRNAME-$VERSION $TMPDIR$DOCDIR
+ fi
+ fi
+
+ /sbin/ldconfig -n $TMPDIR$LIBDIR
+
+ sudo chown -Rh root:root $TMPDIR/*
+ dpkg -b $TMPDIR $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
+}
+
+PACKAGE_NAME=@PKGNAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+DEBARCH=@DEBARCH@
+SRCDIR=@abs_top_srcdir@
+PREFIX=%{__prefix}
+DOCDIR=%{__docdir}
+LIBDIR=%{__libdir}
+
+makedeb 0
+if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi
+
+exit
diff --git a/release/makemacpkg.in b/release/makemacpkg.in
new file mode 100644
index 0000000..65abdef
--- /dev/null
+++ b/release/makemacpkg.in
@@ -0,0 +1,267 @@
+#!/bin/sh
+
+set -u
+set -e
+trap onexit INT
+trap onexit TERM
+trap onexit EXIT
+
+TMPDIR=
+
+onexit()
+{
+ if [ ! "$TMPDIR" = "" ]; then
+ sudo rm -rf $TMPDIR
+ fi
+}
+
+usage()
+{
+ echo "$0 [-build32 [32-bit build dir]] [-buildarmv6 [ARM v6 build dir]] [-buildarmv7 [ARM v7 build dir]] [-buildarmv7s [ARM v7s build dir]]"
+ exit 1
+}
+
+PACKAGE_NAME=@PKGNAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+SRCDIR=@abs_top_srcdir@
+BUILDDIR32=@abs_top_srcdir@/osxx86
+BUILD32=0
+BUILDDIRARMV6=@abs_top_srcdir@/iosarmv6
+BUILDARMV6=0
+BUILDDIRARMV7=@abs_top_srcdir@/iosarmv7
+BUILDARMV7=0
+BUILDDIRARMV7S=@abs_top_srcdir@/iosarmv7s
+BUILDARMV7S=0
+WITH_JAVA=@WITH_JAVA@
+
+PREFIX=%{__prefix}
+BINDIR=%{__bindir}
+DOCDIR=%{__docdir}
+LIBDIR=%{__libdir}
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -h*) usage 0 ;;
+ -build32)
+ BUILD32=1
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ BUILDDIR32=$2; shift
+ fi
+ fi
+ ;;
+ -buildarmv6)
+ BUILDARMV6=1
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ BUILDDIRARMV6=$2; shift
+ fi
+ fi
+ ;;
+ -buildarmv7)
+ BUILDARMV7=1
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ BUILDDIRARMV7=$2; shift
+ fi
+ fi
+ ;;
+ -buildarmv7s)
+ BUILDARMV7S=1
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ BUILDDIRARMV7S=$2; shift
+ fi
+ fi
+ ;;
+ esac
+ shift
+done
+PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+
+if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then
+ rm -f $PACKAGE_NAME-$VERSION.dmg
+fi
+
+umask 022
+TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
+PKGROOT=$TMPDIR/pkg/Package_Root
+mkdir -p $PKGROOT
+make install DESTDIR=$PKGROOT docdir=/Library/Documentation/$PACKAGE_NAME \
+ exampledir=/Library/Documentation/$PACKAGE_NAME
+rm -f $PKGROOT$LIBDIR/*.la
+
+if [ "$PREFIX" = "/opt/libjpeg-turbo" -a "$DOCDIR" = "/opt/libjpeg-turbo/doc" ]; then
+ ln -fs /Library/Documentation/$PACKAGE_NAME $PKGROOT$DOCDIR
+fi
+
+if [ $BUILD32 = 1 ]; then
+ if [ ! -d $BUILDDIR32 ]; then
+ echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIR32/Makefile ]; then
+ echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
+ exit 1
+ fi
+ mkdir -p $TMPDIR/dist.x86
+ pushd $BUILDDIR32
+ make install DESTDIR=$TMPDIR/dist.x86
+ popd
+ if [ ! -h $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
+ ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+ -arch x86_64 $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+ -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+ elif [ ! -h $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
+ ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+ -arch x86_64 $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+ -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
+ fi
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.a \
+ -arch x86_64 $PKGROOT/$LIBDIR/libjpeg.a \
+ -output $PKGROOT/$LIBDIR/libjpeg.a
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.0.dylib \
+ -arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.a \
+ -arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.a \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.a
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/cjpeg \
+ -arch x86_64 $PKGROOT/$BINDIR/cjpeg \
+ -output $PKGROOT/$BINDIR/cjpeg
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/djpeg \
+ -arch x86_64 $PKGROOT/$BINDIR/djpeg \
+ -output $PKGROOT/$BINDIR/djpeg
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/jpegtran \
+ -arch x86_64 $PKGROOT/$BINDIR/jpegtran \
+ -output $PKGROOT/$BINDIR/jpegtran
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/tjbench \
+ -arch x86_64 $PKGROOT/$BINDIR/tjbench \
+ -output $PKGROOT/$BINDIR/tjbench
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/rdjpgcom \
+ -arch x86_64 $PKGROOT/$BINDIR/rdjpgcom \
+ -output $PKGROOT/$BINDIR/rdjpgcom
+ lipo -create \
+ -arch i386 $TMPDIR/dist.x86/$BINDIR/wrjpgcom \
+ -arch x86_64 $PKGROOT/$BINDIR/wrjpgcom \
+ -output $PKGROOT/$BINDIR/wrjpgcom
+
+fi
+
+if [ $BUILDARMV6 = 1 ]; then
+ if [ ! -d $BUILDDIRARMV6 ]; then
+ echo ERROR: ARM v6 build directory $BUILDDIRARMV6 does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIRARMV6/Makefile ]; then
+ echo ERROR: ARM v6 build directory $BUILDDIRARMV6 is not configured
+ exit 1
+ fi
+ mkdir -p $TMPDIR/dist.armv6
+ pushd $BUILDDIRARMV6
+ make install DESTDIR=$TMPDIR/dist.armv6
+ popd
+ lipo -create \
+ $PKGROOT/$LIBDIR/libjpeg.a \
+ -arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.a \
+ -output $PKGROOT/$LIBDIR/libjpeg.a
+ lipo -create \
+ $PKGROOT/$LIBDIR/libturbojpeg.a \
+ -arch arm $TMPDIR/dist.armv6/$LIBDIR/libturbojpeg.a \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.a
+fi
+
+if [ $BUILDARMV7 = 1 ]; then
+ if [ ! -d $BUILDDIRARMV7 ]; then
+ echo ERROR: ARM v7 build directory $BUILDDIRARMV7 does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIRARMV7/Makefile ]; then
+ echo ERROR: ARM v7 build directory $BUILDDIRARMV7 is not configured
+ exit 1
+ fi
+ mkdir -p $TMPDIR/dist.armv7
+ pushd $BUILDDIRARMV7
+ make install DESTDIR=$TMPDIR/dist.armv7
+ popd
+ lipo -create \
+ $PKGROOT/$LIBDIR/libjpeg.a \
+ -arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.a \
+ -output $PKGROOT/$LIBDIR/libjpeg.a
+ lipo -create \
+ $PKGROOT/$LIBDIR/libturbojpeg.a \
+ -arch arm $TMPDIR/dist.armv7/$LIBDIR/libturbojpeg.a \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.a
+fi
+
+if [ $BUILDARMV7S = 1 ]; then
+ if [ ! -d $BUILDDIRARMV7S ]; then
+ echo ERROR: ARM v7s build directory $BUILDDIRARMV7S does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIRARMV7S/Makefile ]; then
+ echo ERROR: ARM v7s build directory $BUILDDIRARMV7S is not configured
+ exit 1
+ fi
+ mkdir -p $TMPDIR/dist.armv7s
+ pushd $BUILDDIRARMV7S
+ make install DESTDIR=$TMPDIR/dist.armv7s
+ popd
+ lipo -create \
+ $PKGROOT/$LIBDIR/libjpeg.a \
+ -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.a \
+ -output $PKGROOT/$LIBDIR/libjpeg.a
+ lipo -create \
+ $PKGROOT/$LIBDIR/libturbojpeg.a \
+ -arch arm $TMPDIR/dist.armv7s/$LIBDIR/libturbojpeg.a \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.a
+fi
+
+install_name_tool -id $LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+install_name_tool -id $LIBDIR/libturbojpeg.0.dylib $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
+
+if [ $WITH_JAVA = 1 ]; then
+ ln -fs libturbojpeg.0.dylib $PKGROOT/$LIBDIR/libturbojpeg.jnilib
+fi
+if [ "$PREFIX" = "/opt/libjpeg-turbo" -a "$LIBDIR" = "/opt/libjpeg-turbo/lib" ]; then
+ if [ ! -h $PKGROOT/$PREFIX/lib32 ]; then
+ ln -fs lib $PKGROOT/$PREFIX/lib32
+ fi
+ if [ ! -h $PKGROOT/$PREFIX/lib64 ]; then
+ ln -fs lib $PKGROOT/$PREFIX/lib64
+ fi
+fi
+
+chmod 1775 $PKGROOT/Library
+chmod 775 $PKGROOT/Library/Documentation
+mkdir -p $TMPDIR/pkg/Resources
+
+cp pkgscripts/Description.plist $TMPDIR/pkg/
+cp pkgscripts/Info.plist $TMPDIR/pkg/
+install -m 755 pkgscripts/uninstall $PKGROOT/$BINDIR/
+
+sudo chown -R root:admin $PKGROOT
+cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/
+
+mkdir $TMPDIR/dmg
+$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
+ -f $PKGROOT -r $TMPDIR/pkg/Resources \
+ -i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist
+hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
+ -srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
+
+exit
diff --git a/release/uninstall.in b/release/uninstall.in
new file mode 100644
index 0000000..f167bbd
--- /dev/null
+++ b/release/uninstall.in
@@ -0,0 +1,109 @@
+# Copyright (C)2009-2011, 2013 D. R. Commander. All Rights Reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# - Neither the name of the libjpeg-turbo Project nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+#!/bin/sh
+
+if [ ! "`id -u`" = "0" ]; then
+ echo "ERROR: This script must be executed as root"
+ exit -1
+fi
+
+PACKAGE=@PKGNAME@
+MACPACKAGE=com.$PACKAGE.$PACKAGE
+RECEIPT=/Library/Receipts/$PACKAGE.pkg
+
+LSBOM=
+if [ -d $RECEIPT ]; then
+ LSBOM='lsbom -s -f -l '$RECEIPT'/Contents/Archive.bom'
+else
+ LSBOM='pkgutil --files '$MACPACKAGE
+fi
+
+mylsbom()
+{
+ $LSBOM || (echo "ERROR: Could not list package contents"; exit -1)
+}
+
+echo Removing package files ...
+EXITSTATUS=0
+pushd /
+mylsbom | while read file; do
+ if [ ! -d "$file" ]; then rm "$file" 2>&1 || EXITSTATUS=-1; fi
+done
+popd
+
+echo Removing package directories ...
+PREFIX=%{__prefix}
+BINDIR=%{__bindir}
+DATADIR=%{__datadir}
+INCLUDEDIR=%{__includedir}
+LIBDIR=%{__libdir}
+MANDIR=%{__mandir}
+
+if [ -d $BINDIR ]; then
+ rmdir $BINDIR 2>&1 || EXITSTATUS=-1
+fi
+if [ -d $LIBDIR ]; then
+ rmdir $LIBDIR 2>&1 || EXITSTATUS=-1
+fi
+if [ -d $INCLUDEDIR ]; then
+ rmdir $INCLUDEDIR 2>&1 || EXITSTATUS=-1
+fi
+if [ "$PREFIX" = "/opt/libjpeg-turbo" -a "$LIBDIR" = "/opt/libjpeg-turbo/lib" ]; then
+ if [ -h $LIBDIR\32 ]; then
+ rm $LIBDIR\32 2>&1 || EXITSTATUS=-1
+ fi
+ if [ -h $LIBDIR\64 ]; then
+ rm $LIBDIR\64 2>&1 || EXITSTATUS=-1
+ fi
+fi
+if [ -d $MANDIR/man1 ]; then
+ rmdir $MANDIR/man1 2>&1 || EXITSTATUS=-1
+fi
+if [ -d $MANDIR ]; then
+ rmdir $MANDIR 2>&1 || EXITSTATUS=-1
+fi
+if [ -d $DATADIR/classes ]; then
+ rmdir $DATADIR/classes 2>&1 || EXITSTATUS=-1
+fi
+if [ -d $DATADIR -a "$DATADIR" != "$PREFIX" ]; then
+ rmdir $DATADIR 2>&1 || EXITSTATUS=-1
+fi
+if [ "$PREFIX" = "/opt/libjpeg-turbo" -a -h "$PREFIX/doc" ]; then
+ rm $PREFIX/doc 2>&1 || EXITSTATUS=-1
+fi
+rmdir $PREFIX 2>&1 || EXITSTATUS=-1
+rmdir /Library/Documentation/$PACKAGE 2>&1 || EXITSTATUS=-1
+
+if [ -d $RECEIPT ]; then
+ echo Removing package receipt ...
+ rm -r $RECEIPT 2>&1 || EXITSTATUS=-1
+else
+ echo Forgetting package $MACPACKAGE ...
+ pkgutil --forget $MACPACKAGE
+fi
+
+exit $EXITSTATUS