This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
[Review - Very minor issues] tcm
Minor issues
============
1) In tcm.README, XFree86-base is listed as a runtime requirement. I
have started listed XFree86-bin as a requirement instead. Same goes for
setup.hint. Not critical.
2) In tcm.README, XFree86-devel is listed as a build requirement. There
is no XFree86-devel package; you must have meant XFree86-prog.
3) CYGWIN-PATCHES/tcm-2.20.README should be named
CYWGIN-PATCHES/tcm.README. This isn't actually installed either, which
requires that the "install" command in the build script be changed to
the following:
install() {
(cd ${objdir} && \
make install prefix=${instdir} && \
if [ ! -d ${instdir}${prefix}/X11R6/share/doc/Cygwin ]; then \
mkdir -p ${instdir}${prefix}/X11R6/share/doc/Cygwin ; \
fi && \
if [ ! -d ${instdir}${prefix}/X11R6/share/doc/${PKG}-${VER} ]; then \
mkdir -p ${instdir}${prefix}/X11R6/share/doc/${PKG}-${VER} ; \
fi && \
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
${instdir}${prefix}/X11R6/share/doc/Cygwin/${PKG}-${VER}.README )
}
4) The install command and the prefix variable were a little strange
because, as you can see in #3, the install command sets "prefix" instead
of "DESTDIR". The prefix was left at "/usr" instead of being changed to
"/usr/X11R6".
I attached a new build script that seems to fix #3 and #4 above. Please
take a look at it and use it if it is useful. It is not 100% tested, so
please perform a complete build and packaging on your system to confirm
that it is correct.
Once these minor issues are addressed (should only take a couple
minutes), we can post this package.
Harold
#!/bin/sh
# find out where the build script is located
tdir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$tdir" = "x$0" && tdir=.
scriptdir=`cd $tdir; pwd`
# find src directory.
# If scriptdir ends in SPECS, then topdir is $scriptdir/..
# If scriptdir ends in CYGWIN-PATCHES, then topdir is $scriptdir/../..
# Otherwise, we assume that topdir = scriptdir
topdir1=`echo ${scriptdir} | sed 's%/SPECS$%%'`
topdir2=`echo ${scriptdir} | sed 's%/CYGWIN-PATCHES$%%'`
if [ "x$topdir1" != "x$scriptdir" ] ; then # SPECS
topdir=`cd ${scriptdir}/..; pwd`
else
if [ "x$topdir2" != "x$scriptdir" ] ; then # CYGWIN-PATCHES
topdir=`cd ${scriptdir}/../..; pwd`
else
topdir=`cd ${scriptdir}; pwd`
fi
fi
tscriptname=`basename $0 .sh`
export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
export VER=`echo $tscriptname | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\-//"`
export FULLPKG=${PKG}-${VER}-${REL}
# determine correct decompression option and tarball filename
if [ -e ${PKG}-${VER}.tar.gz ] ; then
export opt_decomp=z
export src_orig_pkg_ext=gz
elif [ -e ${PKG}-${VER}.tar.bz2 ] ; then
export opt_decomp=j
export src_orig_pkg_ext=bz2
fi
export src_orig_pkg_name=${PKG}-${VER}.tar.${src_orig_pkg_ext}
export src_pkg_name=${FULLPKG}-src.tar.bz2
export src_patch_name=${FULLPKG}.patch
export bin_pkg_name=${FULLPKG}.tar.bz2
export src_orig_pkg=${topdir}/${src_orig_pkg_name}
export src_pkg=${topdir}/${src_pkg_name}
export src_patch=${topdir}/${src_patch_name}
export bin_pkg=${topdir}/${bin_pkg_name}
export srcdir=${topdir}/${PKG}-${VER}
export objdir=${srcdir}/.build
export instdir=${srcdir}/.inst
export srcinstdir=${srcdir}/.sinst
export checkfile=${topdir}/${FULLPKG}.check
# run on
host=i686-pc-cygwin
# if this package creates binaries, they run on
target=i686-pc-cygwin
prefix=/usr/X11R6
sysconfdir=/etc
MY_CFLAGS="-O2"
MY_LDFLAGS=
mkdirs() {
(cd ${topdir} && \
mkdir -p ${objdir} && \
mkdir -p ${instdir} && \
mkdir -p ${srcinstdir} )
}
prep() {
(cd ${topdir} && \
tar xv${opt_decomp}f ${src_orig_pkg} ; \
cd ${topdir} && \
patch -p0 < ${src_patch}
&& mkdirs )
}
conf() {
(cd ${objdir} && \
lndir ${srcdir} && \
rm -rf .build .inst .sinst && \
# due to trouble with "make install" (who preserves symlinks)
to_be_copied="bin/psf doc man lib CYGWIN-PATCHES CHANGELOG COPYING FILEMAP INSTALL_ README" && \
rm -r ${to_be_copied} && \
tar cfC - .. ${to_be_copied} | tar xf - && \
make )
}
build() {
(cd ${objdir} && \
make execs )
}
check() {
( true )
}
clean() {
(cd ${objdir} && \
make clean )
}
install() {
(cd ${objdir} && \
make install DESTDIR=${instdir} && \
if [ ! -d ${instdir}${prefix}/share/doc/Cygwin ]; then \
mkdir -p ${instdir}${prefix}/share/doc/Cygwin ; \
fi && \
if [ ! -d ${instdir}${prefix}/share/doc/${PKG}-${VER} ]; then \
mkdir -p ${instdir}${prefix}/share/doc/${PKG}-${VER} ; \
fi && \
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README )
}
strip() {
(cd ${instdir} && \
find . -name "*.dll" | xargs strip > /dev/null 2>&1
find . -name "*.exe" | xargs strip > /dev/null 2>&1
true )
}
list() {
(cd ${instdir} && \
find . -name "*" ! -type d | sed 's/\.\/\(.*\)/\1/'
true )
}
pkg() {
(cd ${instdir} && \
tar cvjf ${bin_pkg} * )
}
mkpatch() {
(cd ${srcdir} && \
find . -name "autom4te.cache" | xargs rm -rf > /dev/null
tar xv${opt_decomp}f ${src_orig_pkg} ;\
mv ${PKG}-${VER} ../${PKG}-${VER}-orig && \
cd ${topdir} && \
diff -urN -x '.build' -x '.inst' -x '.sinst' \
${PKG}-${VER}-orig ${PKG}-${VER} > \
${srcinstdir}/${src_patch_name} ; \
rm -rf ${PKG}-${VER}-orig )
}
spkg() {
(mkpatch && \
cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
cp $0 ${srcinstdir}/`basename $0` && \
cd ${srcinstdir} && \
tar cvjf ${src_pkg} * )
}
finish() {
rm -rf ${srcdir}
}
case $1 in
prep) prep ; STATUS=$? ;;
mkdirs) mkdirs; STATUS=$? ;;
conf) conf ; STATUS=$? ;;
build) build ; STATUS=$? ;;
check) check ; STATUS=$? ;;
clean) clean ; STATUS=$? ;;
install) install ; STATUS=$? ;;
list) list ; STATUS=$? ;;
strip) strip ; STATUS=$? ;;
package) pkg ; STATUS=$? ;;
pkg) pkg ; STATUS=$? ;;
mkpatch) mkpatch ; STATUS=$? ;;
src-package) spkg ; STATUS=$? ;;
spkg) spkg ; STATUS=$? ;;
finish) finish ; STATUS=$? ;;
all) prep && conf && build && install && \
strip && pkg && spkg && finish ; \
STATUS=$? ;;
*) echo "Error: bad arguments" ; exit 1 ;;
esac
exit ${STATUS}