From d1c281a055824292b3cd6ed9017300cd89f3e025 Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 17 Nov 2010 22:44:40 +0000 Subject: [PATCH] Create /opt/libjpeg-turbo/lib32 and /opt/libjpeg-turbo/lib64 symlinks when doing 'make install' git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@294 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 5 +++++ Makefile.am | 24 ++++++++++++++++++++++++ release/libjpeg-turbo.spec.in | 4 ---- release/makedpkg | 7 ------- release/makemacpkg.in | 8 ++++++-- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index cf469ff..cb0a2c8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 =============================== diff --git a/Makefile.am b/Makefile.am index adc4cb6..bf0c1df 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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; \ diff --git a/release/libjpeg-turbo.spec.in b/release/libjpeg-turbo.spec.in index bbf2879..e911ad5 100644 --- a/release/libjpeg-turbo.spec.in +++ b/release/libjpeg-turbo.spec.in @@ -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 diff --git a/release/makedpkg b/release/makedpkg index f565464..a532793 100644 --- a/release/makedpkg +++ b/release/makedpkg @@ -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/ diff --git a/release/makemacpkg.in b/release/makemacpkg.in index b5a7422..e285e6b 100644 --- a/release/makemacpkg.in +++ b/release/makemacpkg.in @@ -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 -- 2.40.0