]> granicus.if.org Git - libjpeg-turbo/commitdiff
Create /opt/libjpeg-turbo/lib32 and /opt/libjpeg-turbo/lib64 symlinks when doing...
authorDRC <dcommander@users.sourceforge.net>
Wed, 17 Nov 2010 22:44:40 +0000 (22:44 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 17 Nov 2010 22:44:40 +0000 (22:44 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@294 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
Makefile.am
release/libjpeg-turbo.spec.in
release/makedpkg
release/makemacpkg.in

index cf469ff7e599dbbb982bd331a9e2e591a9d520da..cb0a2c823362baa52b2f5bc200093b2523f88971 100644 (file)
@@ -10,6 +10,11 @@ README-turbo.txt for more details.  This feature was sponsored by CamTrace SAS.
 
 [4] jpgtest can now be used to test decompression performance only.
 
+[5] If the default install prefix (/opt/libjpeg-turbo) is used, then
+'make install' now creates /opt/libjpeg-turbo/lib32 and
+/opt/libjpeg-turbo/lib64 sym links to duplicate the behavior of the binary
+packages.
+
 
 Significant changes since 1.0.0
 ===============================
index adc4cb6e1a6b2c1edcc70322186711c71031c812..bf0c1df343ec88782847b7810b6da46c862f0bd8 100644 (file)
@@ -170,6 +170,30 @@ testclean:
        rm -f *_444Q[0-9]*.ppm
        rm -f *_444Q[0-9]*.jpg
 
+if X86_64
+
+install-exec-hook:
+       __PREFIX=`echo ${prefix} | sed -e 's@\/*$$@@'`;  \
+       if [ "$$__PREFIX" = "/opt/libjpeg-turbo" ]; then  \
+               cd $(DESTDIR)/${prefix};  \
+               if [ -d lib -a ! -d lib64 -a ! -h lib64 ]; then  \
+                       $(LN_S) lib lib64;  \
+               fi  \
+       fi
+
+else
+
+install-exec-hook:
+       __PREFIX=`echo ${prefix} | sed -e 's@\/*$$@@'`;  \
+       if [ "$$__PREFIX" = "/opt/libjpeg-turbo" ]; then  \
+               cd $(DESTDIR)/${prefix};  \
+               if [ -d lib -a ! -d lib32 -a ! -h lib32 ]; then  \
+                       $(LN_S) lib lib32;  \
+               fi  \
+       fi
+
+endif
+
 rpm: all
        TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
        mkdir -p $$TMPDIR/RPMS; \
index bbf2879f5f42a4d7bf3ac0f7cfc5402b2eb5e61a..e911ad56986c9c0cb14b1db5509e5ed523913cac 100644 (file)
@@ -55,10 +55,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/include
 mv $RPM_BUILD_ROOT/opt/%{name}/include/turbojpeg.h $RPM_BUILD_ROOT/usr/include
 ln -fs /usr/include/turbojpeg.h $RPM_BUILD_ROOT/opt/%{name}/include/
 ln -fs /usr/%{__lib}/libturbojpeg.a $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/
-%ifarch x86_64
-%else
-ln -fs %{__lib} $RPM_BUILD_ROOT/opt/%{name}/lib32
-%endif
 
 %post -p /sbin/ldconfig
 
index f5654643833b7ccf70b6e8ca8b42a75cf170e27e..a532793488b8535aa4f99577335bfbe3689860a0 100644 (file)
@@ -58,13 +58,6 @@ makedeb()
        /sbin/ldconfig -n $TMPDIR/usr/$__LIB
 
        if [ ! $SUPPLEMENT = 1 ]; then
-               if [ "$DEBARCH" = "amd64" ]; then
-                       ln -fs lib $TMPDIR/opt/$DIRNAME/lib64
-               else
-                       if [ ! "$__LIB" = "lib32" ]; then
-                               ln -fs lib $TMPDIR/opt/$DIRNAME/lib32
-                       fi
-               fi
                mkdir -p $TMPDIR/usr/include
                mv $TMPDIR/opt/$DIRNAME/include/turbojpeg.h $TMPDIR/usr/include
                ln -fs /usr/include/turbojpeg.h $TMPDIR/opt/$DIRNAME/include/
index b5a7422641e540241b477b295171226075407173..e285e6b2e499c449d12cee411662563ef2d72c03 100644 (file)
@@ -118,8 +118,12 @@ install_name_tool -id libturbojpeg.dylib $PKGROOT/usr/lib/libturbojpeg.dylib
 
 ln -fs /usr/include/turbojpeg.h $PKGROOT/opt/$PACKAGE_NAME/include/
 ln -fs /usr/lib/libturbojpeg.a $PKGROOT/opt/$PACKAGE_NAME/lib/
-ln -fs lib $PKGROOT/opt/$PACKAGE_NAME/lib32
-ln -fs lib $PKGROOT/opt/$PACKAGE_NAME/lib64
+if [ ! -h $PKGROOT/opt/$PACKAGE_NAME/lib32 ]; then
+       ln -fs lib $PKGROOT/opt/$PACKAGE_NAME/lib32
+fi
+if [ ! -h $PKGROOT/opt/$PACKAGE_NAME/lib64 ]; then
+       ln -fs lib $PKGROOT/opt/$PACKAGE_NAME/lib64
+fi
 
 mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME
 chmod 1775 $PKGROOT/Library