]> granicus.if.org Git - libjpeg-turbo/commitdiff
Install docs when doing 'make install' on Unix; Fix 'install' target on Windows;...
authorDRC <dcommander@users.sourceforge.net>
Fri, 10 Feb 2012 00:39:05 +0000 (00:39 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 10 Feb 2012 00:39:05 +0000 (00:39 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@790 632fc199-4ca6-4c93-a231-07263d6284db

CMakeLists.txt
Makefile.am
release/libjpeg-turbo.nsi.in
release/libjpeg-turbo.spec.in
release/makecygwinpkg.in
release/makedpkg.in
release/makemacpkg.in
release/makesunpkg.in

index a166730aba41370e27f56a90c58eefe9ee86fda9..d95c9e68d44095c6d8a3a9706040e79ce84f7272 100644 (file)
@@ -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
index e8b25702ac8299e3c93bcefc865f3f5db1412a18..791fdd2e4de9b6f9029925924a0535601522358f 100644 (file)
@@ -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 \
index 39773f6ae788487b160406e38ae3d041683206a7..f4643fd1722373e4e1871ec982da942db72779bd 100755 (executable)
@@ -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"
index 5d40fedec068495243c9373b25edb3799be4f07b..9e0ff88329e054c3b5d4508a56b26d4062df73b8 100644 (file)
@@ -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
index 2dbd650c7ba0a1857b877ed0bc2a6c5134acc3f5..5fac864cc6488d5d6da78b9ec8ec44bdc1131e13 100755 (executable)
@@ -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 *
index 7a15518d1c7c98e536ddab4ca2d3690c825d3d9c..936151b6992497179eb4d1f680214bd36d09412d 100644 (file)
@@ -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/*
index 2ee080531717eea15f3f8c48ec6d612f8e2d9bc4..b0f45ab97de7d7a0d68b5a52d1431508ffba851b 100644 (file)
@@ -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/ 
index 3331dab02fda20b3306ae9a311fad562657f91ed..7cf36a880e3f886c4c8a91508f41cfa8ac1648a5 100644 (file)
@@ -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 <<EOF
 i copyright
@@ -122,10 +122,13 @@ f none $PACKAGE_NAME/include/jmorecfg.h 0644 root bin
 f none $PACKAGE_NAME/include/jpeglib.h 0644 root bin
 f none $PACKAGE_NAME/include/turbojpeg.h 0644 root bin
 d none $PACKAGE_NAME/doc 0755 root bin
-f none $PACKAGE_NAME/doc/libjpeg.txt 0644 root bin
 f none $PACKAGE_NAME/doc/README 0644 root bin
 f none $PACKAGE_NAME/doc/README-turbo.txt 0644 root bin
+f none $PACKAGE_NAME/doc/example.c 0644 root bin
+f none $PACKAGE_NAME/doc/libjpeg.txt 0644 root bin
+f none $PACKAGE_NAME/doc/structure.txt 0644 root bin
 f none $PACKAGE_NAME/doc/usage.txt 0644 root bin
+f none $PACKAGE_NAME/doc/wizard.txt 0644 root bin
 EOF
 if [ $WITH_JAVA = 1 ]; then
 echo d none $PACKAGE_NAME/classes 0755 root bin >>$TMPDIR/proto