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
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 \
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"
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"
%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}
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
%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
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 *
| 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
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/*
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
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
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/
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
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