From: DRC Date: Fri, 10 Feb 2012 00:39:05 +0000 (+0000) Subject: Install docs when doing 'make install' on Unix; Fix 'install' target on Windows;... X-Git-Tag: 1.2.0~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1647c84128ecd840024a8579cd672c4556d9ff7;p=libjpeg-turbo Install docs when doing 'make install' on Unix; Fix 'install' target on Windows; Include wizard.txt, example.c, and structure.txt in installed docs git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@790 632fc199-4ca6-4c93-a231-07263d6284db --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a166730..d95c9e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -419,9 +419,10 @@ install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom tjbench RUNTIME DESTINATION bin ) -install(FILES ${CMAKE_SOURCE_DIR}/LGPL.txt ${CMAKE_SOURCE_DIR}/LICENSE.txt - ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt - ${CMAKE_SOURCE_DIR}/libjpeg.txt ${CMAKE_SOURCE_DIR}/usage.txt +install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt + ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt + ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt + ${CMAKE_SOURCE_DIR}/wizard.txt DESTINATION doc) install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h diff --git a/Makefile.am b/Makefile.am index e8b2570..791fdd2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -120,9 +120,15 @@ jcstest_LDADD = libjpeg.la dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 -DOCS= README install.txt usage.txt wizard.txt example.c libjpeg.txt \ - structure.txt coderules.txt filelist.txt jconfig.txt change.log \ - README-turbo.txt rdrle.c wrrle.c BUILDING.txt ChangeLog.txt +DOCS= install.txt coderules.txt filelist.txt jconfig.txt change.log \ + rdrle.c wrrle.c BUILDING.txt ChangeLog.txt + +docdir = $(datadir)/doc +doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \ + wizard.txt + +exampledir = $(datadir)/doc +example_DATA = example.c EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \ diff --git a/release/libjpeg-turbo.nsi.in b/release/libjpeg-turbo.nsi.in index 39773f6..f4643fd 100755 --- a/release/libjpeg-turbo.nsi.in +++ b/release/libjpeg-turbo.nsi.in @@ -76,8 +76,11 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)" 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_DIR@ @VERSION@" "Install_Dir" "$INSTDIR" @@ -132,8 +135,11 @@ Section "Uninstall" 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" diff --git a/release/libjpeg-turbo.spec.in b/release/libjpeg-turbo.spec.in index 5d40fed..9e0ff88 100644 --- a/release/libjpeg-turbo.spec.in +++ b/release/libjpeg-turbo.spec.in @@ -48,7 +48,7 @@ available to a broader range of users and developers. %install rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man +make install DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man docdir=/opt/%{name}/doc exampledir=/opt/%{name}/doc rm -f $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/*.la mkdir -p $RPM_BUILD_ROOT/usr/%{__lib} mv $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/libturbojpeg.* $RPM_BUILD_ROOT/usr/%{__lib} @@ -58,6 +58,8 @@ 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}/ +mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir} +mv $RPM_BUILD_ROOT/opt/%{name}/doc $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version} %post -p /sbin/ldconfig @@ -68,7 +70,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc %{_srcdir}/README-turbo.txt %{_srcdir}/README %{_srcdir}/libjpeg.txt %{_srcdir}/usage.txt +%dir %{_defaultdocdir}/%{name}-%{version} +%doc %{_defaultdocdir}/%{name}-%{version}/* %dir /opt/%{name} %dir /opt/%{name}/bin /opt/%{name}/bin/cjpeg diff --git a/release/makecygwinpkg.in b/release/makecygwinpkg.in index 2dbd650..5fac864 100755 --- a/release/makecygwinpkg.in +++ b/release/makecygwinpkg.in @@ -23,14 +23,10 @@ umask 022 rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2 TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` __PWD=`pwd` -make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man +make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man \ + docdir=/usr/share/doc/$PACKAGE_NAME-$VERSION \ + exampledir=/usr/share/doc/$PACKAGE_NAME-$VERSION \ rm $TMPDIR/pkg/opt/$PACKAGE_NAME/lib/*.la -DOCDIR=$TMPDIR/pkg/usr/share/doc/$PACKAGE_NAME-$VERSION -mkdir -p $DOCDIR -install -m 644 $SRCDIR/README-turbo.txt $DOCDIR -install -m 644 $SRCDIR/README $DOCDIR -install -m 644 $SRCDIR/libjpeg.txt $DOCDIR -install -m 644 $SRCDIR/usage.txt $DOCDIR ln -fs lib $TMPDIR/pkg/opt/$PACKAGE_NAME/lib32 cd $TMPDIR/pkg tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 * diff --git a/release/makedpkg.in b/release/makedpkg.in index 7a15518..936151b 100644 --- a/release/makedpkg.in +++ b/release/makedpkg.in @@ -36,7 +36,10 @@ makedeb() | sed s/{__VERSION}/$VERSION/g | sed s/{__BUILD}/$BUILD/g \ | sed s/{__ARCH}/$DEBARCH/g > $TMPDIR/DEBIAN/control) - make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man + make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB \ + mandir=$TMPDIR/opt/$DIRNAME/man \ + docdir=$TMPDIR/usr/share/doc/$DIRNAME-$VERSION \ + exampledir=$TMPDIR/usr/share/doc/$DIRNAME-$VERSION rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la if [ $SUPPLEMENT = 1 ]; then @@ -63,11 +66,6 @@ makedeb() 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/ - mkdir -p $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/README-turbo.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/README $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/libjpeg.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/usage.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION fi sudo chown -Rh root:root $TMPDIR/* diff --git a/release/makemacpkg.in b/release/makemacpkg.in index 2ee0805..b0f45ab 100644 --- a/release/makemacpkg.in +++ b/release/makemacpkg.in @@ -46,7 +46,9 @@ TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` PKGROOT=$TMPDIR/pkg/Package_Root mkdir -p $PKGROOT mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin -make install DESTDIR=$PKGROOT mandir=/opt/$PACKAGE_NAME/man +make install DESTDIR=$PKGROOT mandir=/opt/$PACKAGE_NAME/man \ + docdir=/Library/Documentation/$PACKAGE_NAME \ + exampledir=/Library/Documentation/$PACKAGE_NAME rm -f $PKGROOT/opt/$PACKAGE_NAME/lib/*.la mkdir -p $PKGROOT/usr/lib mv $PKGROOT/opt/$PACKAGE_NAME/lib/libturbojpeg.* $PKGROOT/usr/lib @@ -133,7 +135,6 @@ 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 chmod 775 $PKGROOT/Library/Documentation mkdir -p $TMPDIR/pkg/Resources @@ -142,11 +143,6 @@ 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/README-turbo.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/README-turbo.txt -install -m 644 $SRCDIR/README $PKGROOT/Library/Documentation/$PACKAGE_NAME/README -install -m 644 $SRCDIR/libjpeg.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/libjpeg.txt -install -m 644 $SRCDIR/usage.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/usage.txt - sudo chown -R root:admin $PKGROOT sudo chown -R root:0 $PKGROOT/usr cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/ diff --git a/release/makesunpkg.in b/release/makesunpkg.in index 3331dab..7cf36a8 100644 --- a/release/makesunpkg.in +++ b/release/makesunpkg.in @@ -65,11 +65,11 @@ if [ $COMBINED = 1 ]; then cd $PWD fi # This mess is to work around a bug in /usr/ccs/bin/make -make install DESTDIR=$TMPDIR libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man AM_MAKEFLAGS="libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man" +make install DESTDIR=$TMPDIR libdir=/opt/$PACKAGE_NAME/$__LIB \ + mandir=/opt/$PACKAGE_NAME/man docdir=/opt/$PACKAGE_NAME/doc \ + exampledir=/opt/$PACKAGE_NAME/doc \ + AM_MAKEFLAGS="libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man docdir=/opt/$PACKAGE_NAME/doc exampledir=/opt/$PACKAGE_NAME/doc" rm -f $TMPDIR/opt/$PACKAGE_NAME/$__LIB/*.la -mkdir -p $TMPDIR/opt/$PACKAGE_NAME/doc -cp $SRCDIR/README-turbo.txt $SRCDIR/README $SRCDIR/libjpeg.txt $SRCDIR/usage.txt $TMPDIR/opt/$PACKAGE_NAME/doc -chmod 644 $TMPDIR/opt/$PACKAGE_NAME/doc/* cat >$TMPDIR/proto <>$TMPDIR/proto