# Installer
#
-set(INST_NAME ${CMAKE_PROJECT_NAME})
-
if(MSVC)
set(INST_PLATFORM "Visual C++")
+ set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
+ set(INST_DIR ${CMAKE_PROJECT_NAME})
elseif(MINGW)
set(INST_PLATFORM GCC)
- set(INST_NAME ${INST_NAME}-gcc)
+ set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
+ set(INST_DIR ${CMAKE_PROJECT_NAME}-gcc)
set(INST_DEFS -DGCC)
endif()
if(64BIT)
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
set(INST_NAME ${INST_NAME}64)
+ set(INST_DIR ${INST_DIR}64)
set(INST_DEFS ${INST_DEFS} -DWIN64)
endif()
add_custom_target(installer
makensis -nocd ${INST_DEFS} libjpeg-turbo.nsi
- DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static
+ DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
+ cjpeg djpeg jpegtran jpgtest
SOURCES libjpeg-turbo.nsi)
install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom jpgtest
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
mkdir -p $$TMPDIR/RPMS; \
ln -fs `pwd` $$TMPDIR/BUILD; \
- rm -f ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
--define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \
- --target ${RPMARCH} libjpeg-turbo.spec; \
- cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
+ cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
+ ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rm -rf $$TMPDIR
srpm: dist-gzip
mkdir -p $$TMPDIR/BUILD; \
mkdir -p $$TMPDIR/SOURCES; \
mkdir -p $$TMPDIR/SPECS; \
- rm -f ${PACKAGE_NAME}.src.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \
cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
- cat libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
+ cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
| sed s@%{_srcdir}/@@g | sed s/#--\>//g \
- >$$TMPDIR/SPECS/libjpeg-turbo.spec; \
+ > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
- cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm ${PACKAGE_NAME}.src.rpm; \
+ cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \
+ ${PACKAGE_NAME}-${VERSION}.src.rpm; \
rm -rf $$TMPDIR
deb: all
- sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
- ${DEBARCH} ${srcdir}
+ sh pkgscripts/makedpkg
if X86_64
udmg: all
- sh makemacpkg universal ${BUILDDIR32}
+ sh pkgscripts/makemacpkg universal ${BUILDDIR32}
endif
dmg: all
- sh makemacpkg
+ sh pkgscripts/makemacpkg
if X86_64
csunpkg: all
- sh makesunpkg combined ${BUILDDIR32}
+ sh pkgscripts/makesunpkg combined ${BUILDDIR32}
endif
sunpkg: all
- sh makesunpkg
+ sh pkgscripts/makesunpkg
cygwinpkg: all
- sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}
+ sh pkgscripts/makecygwinpkg
# jconfig.h is a minimal version that allows this package to be built
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([jconfig.h])
-AC_CONFIG_FILES([libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
-AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in])
-AC_CONFIG_FILES([makesunpkg:release/makesunpkg.in])
+AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
+AC_CONFIG_FILES([pkgscripts/makecygwinpkg:release/makecygwinpkg.in])
+AC_CONFIG_FILES([pkgscripts/makedpkg:release/makedpkg.in])
+AC_CONFIG_FILES([pkgscripts/deb-control:release/deb-control.in])
+AC_CONFIG_FILES([pkgscripts/makemacpkg:release/makemacpkg.in])
+AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
+AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
+AC_CONFIG_FILES([pkgscripts/uninstall:release/uninstall.in])
+AC_CONFIG_FILES([pkgscripts/makesunpkg:release/makesunpkg.in])
+AC_CONFIG_FILES([pkgscripts/pkginfo:release/pkginfo.in])
AC_CONFIG_FILES([libjpeg.map])
AC_CONFIG_FILES([Makefile simd/Makefile])
AC_OUTPUT
<key>IFPkgDescriptionDescription</key>
<string>A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs</string>
<key>IFPkgDescriptionTitle</key>
- <string>{__APPNAME}</string>
+ <string>@PACKAGE_NAME@</string>
<key>IFPkgDescriptionVersion</key>
- <string>{__VERSION}</string>
+ <string>@VERSION@</string>
</dict>
</plist>
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
- <string>{__VERSION}, The libjpeg-turbo Project</string>
+ <string>@VERSION@, The libjpeg-turbo Project</string>
<key>CFBundleIdentifier</key>
<string>com.libjpeg-turbo.libjpeg-turbo</string>
<key>CFBundleShortVersionString</key>
- <string>{__VERSION}</string>
+ <string>@VERSION@</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
- <integer>{__BUILD}</integer>
+ <integer>@BUILD@</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<key>IFPkgFlagAuthorizationAction</key>
-Package: {__PKGNAME}
-Version: {__VERSION}-{__BUILD}
+Package: @PACKAGE_NAME@
+Version: @VERSION@-@BUILD@
Section: misc
Priority: optional
-Architecture: {__ARCH}
+Architecture: @DEBARCH@
Essential: no
Maintainer: The libjpeg-turbo Project [http://libjpeg-turbo.VirtualGL.org]
Description: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
!include x64.nsh
Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
-InstallDir c:\@INST_NAME@
+InstallDir c:\@INST_DIR@
SetCompressor bzip2
File "@CMAKE_SOURCE_DIR@\LICENSE.txt"
File "@CMAKE_SOURCE_DIR@\usage.txt"
- WriteRegStr HKLM "SOFTWARE\@INST_NAME@ @VERSION@" "Install_Dir" "$INSTDIR"
+ WriteRegStr HKLM "SOFTWARE\@INST_DIR@ @VERSION@" "Install_Dir" "$INSTDIR"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "NoRepair" 1
WriteUninstaller "uninstall_@VERSION@.exe"
SectionEnd
SetShellVarContext all
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@"
- DeleteRegKey HKLM "SOFTWARE\@INST_NAME@ @VERSION@"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@"
+ DeleteRegKey HKLM "SOFTWARE\@INST_DIR@ @VERSION@"
!ifdef GCC
Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
fi
}
-usage()
-{
- echo "$0 <package name> <version> <source dir.>"
- exit 1
-}
-
-if [ $# -lt 3 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-SRCDIR=$3
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+SRCDIR=@abs_top_srcdir@
umask 022
rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2
fi
}
-usage()
-{
- echo "$0 <package name> <version> <build> <DEB architecture> <source dir.>"
- exit 1
-}
-
makedeb()
{
SUPPLEMENT=$1
fi
umask 022
- rm -f $PACKAGE_NAME\_$DEBARCH.deb
+ 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)
+ cp pkgscripts/deb-control $TMPDIR/DEBIAN/control
make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man
rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la
fi
sudo chown -Rh root:root $TMPDIR/*
- dpkg -b $TMPDIR $PACKAGE_NAME\_$DEBARCH.deb
+ dpkg -b $TMPDIR $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
}
-if [ $# -lt 5 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-BUILD=$3
-DEBARCH=$4
-SRCDIR=$5
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+DEBARCH=@DEBARCH@
+SRCDIR=@abs_top_srcdir@
makedeb 0
if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi
PACKAGE_NAME=@PACKAGE_NAME@
VERSION=@VERSION@
BUILD=@BUILD@
-SRCDIR=@srcdir@
-BUILDDIR32=@srcdir@/osxx86
+SRCDIR=@abs_top_srcdir@
+BUILDDIR32=@abs_top_srcdir@/osxx86
BUILDJNILIB=@BUILDJNILIB@
if [ $# -gt 0 ]; then
if [ "$1" = "universal" ]; then
fi
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-if [ -f $PACKAGE_NAME.dmg ]; then
- rm -f $PACKAGE_NAME.dmg
+if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then
+ rm -f $PACKAGE_NAME-$VERSION.dmg
fi
umask 022
chmod 775 $PKGROOT/Library/Documentation
mkdir -p $TMPDIR/pkg/Resources
-(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $TMPDIR/pkg/Description.plist)
-(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist)
-(cat $SRCDIR/release/uninstall.sh.tmpl \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall)
-chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
+cp pkgscripts/Description.plist $TMPDIR/pkg/
+cp pkgscripts/Info.plist $TMPDIR/pkg/
+install -m 755 pkgscripts/uninstall $PKGROOT/opt/$PACKAGE_NAME/bin/
install -m 644 $SRCDIR/LICENSE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/LICENSE.txt
install -m 644 $SRCDIR/LGPL.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/LGPL.txt
sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app" $TMPDIR/uninstall.applescript
sudo chown -R $USER "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app"
hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
- -srcfolder "$TMPDIR/dmg" \
- $TMPDIR/$PACKAGE_NAME.dmg
-cp $TMPDIR/$PACKAGE_NAME.dmg .
+ -srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
exit
VERSION=@VERSION@
BUILD=@BUILD@
PKGARCH=@DEBARCH@
-SRCDIR=@srcdir@
-BUILDDIR32=@srcdir@/solx86
+SRCDIR=@abs_top_srcdir@
+BUILDDIR32=@abs_top_srcdir@/solx86
if [ $# -gt 0 ]; then
if [ "$1" = "combined" ]; then
COMBINED=1
rm -f $PACKAGE_NAME.pkg.bz2
cp $SRCDIR/release/copyright $TMPDIR
touch $TMPDIR/depend
-cat $SRCDIR/release/pkginfo.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__BUILD}/$BUILD/g | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- | sed s/{__PKGNAME}/$PACKAGE_NAME/g > $TMPDIR/pkginfo
+cp pkgscripts/pkginfo $TMPDIR/pkginfo
if [ "$PKGARCH" = "i386" ]; then
__LIB=lib
EOF
pkgmk -o -r $TMPDIR/opt -d $TMPDIR -a i386 -f $TMPDIR/proto
-pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME.pkg $PACKAGE_NAME
-bzip2 $TMPDIR/$PACKAGE_NAME.pkg
-cp $TMPDIR/$PACKAGE_NAME.pkg.bz2 .
+pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME-$VERSION.pkg $PACKAGE_NAME
+bzip2 $TMPDIR/$PACKAGE_NAME-$VERSION.pkg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.pkg.bz2 .
exit
ARCH=i386
-PKG={__PKGNAME}
-NAME={__APPNAME} SDK and run time libraries
-VERSION={__VERSION},REV={__BUILD}
+PKG=@PACKAGE_NAME@
+NAME=@PACKAGE_NAME@ SDK and run time libraries
+VERSION=@VERSION@,REV=@BUILD@
SUNW_PKGVERS=1.0
DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
VENDOR=The libjpeg-turbo Project
-# Copyright (C)2009-2010 D. R. Commander
+# Copyright (C)2009-2011 D. R. Commander
# Copyright (C)2009 Sun Microsystems, Inc.
#
# This library is free software and may be redistributed and/or modified under
error "This command must be run as root"
fi
-PKGNAME={__APPNAME}
+PKGNAME=@PACKAGE_NAME@
MACPKGNAME=com.$PKGNAME.$PKGNAME
RCPT=/Library/Receipts/$PKGNAME.pkg