"Fossies" - the Fresh Open Source Software Archive

Member "devtodo-0.1.20/makepackages.sh.in" (9 May 2006, 2452 Bytes) of package /linux/privat/old/devtodo-0.1.20.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #
    3 # Generate Slackware and RPM packages from devtodo source
    4 #
    5 
    6 prefix=@prefix@
    7 sysconfdir=`eval echo @sysconfdir@`
    8 PACKAGE=@PACKAGE@
    9 VERSION=@VERSION@
   10 ORIGDIR=`pwd`
   11 
   12 cat << EOF
   13 
   14 
   15 ================================================================================
   16                         Generating distribution tar file
   17 ================================================================================
   18 
   19 
   20 EOF
   21 
   22 make dist
   23 
   24 cat << EOF
   25 
   26 
   27 ================================================================================
   28                                  Generating RPMs
   29 ================================================================================
   30 
   31 
   32 EOF
   33 cp ${PACKAGE}-${VERSION}.tar.gz /usr/src/rpm/SOURCES
   34 rpmbuild -ba devtodo.spec
   35 mv /usr/src/rpm/RPMS/i386/${PACKAGE}-${VERSION}-1.i386.rpm .
   36 mv /usr/src/rpm/SRPMS/${PACKAGE}-${VERSION}-1.src.rpm .
   37 
   38 cat << EOF
   39 
   40 
   41 ================================================================================
   42                                Generating Slackpack
   43 ================================================================================
   44 
   45 
   46 EOF
   47 PKGDIR=/var/tmp/${PACKAGE}-${VERSION}.slackpack
   48 
   49 cd /usr/src/rpm/BUILD/${PACKAGE}-${VERSION}
   50 
   51 test -d ${PKGDIR} && mkdir ${PKGDIR}
   52 
   53 make DESTDIR=${PKGDIR} install
   54 
   55 # copy documentation
   56 mkdir -p ${PKGDIR}/$prefix/doc/${PACKAGE}-${VERSION}
   57 cp doc/todorc.example doc/scripts.* README QuickStart INSTALL NEWS ChangeLog AUTHORS COPYING contrib/todo2html*.xslt contrib/tdrec ${PKGDIR}/$prefix/doc/${PACKAGE}-${VERSION}
   58 
   59 cd ${PKGDIR}
   60 
   61 mkdir -p install
   62 mv .$sysconfdir/todorc .$sysconfdir/todorc.latest
   63 
   64 cat << EOF > install/doinst.sh
   65 echo
   66 echo
   67 if test -f ${sysconfdir}/todorc; then
   68     echo "Existing devtodo RC file not overwritten (new one is installed as "
   69     echo "  ${sysconfdir}/todorc.latest)."
   70 else
   71     echo "Installed example config file as ${sysconfdir}/todorc"
   72     mv ${sysconfdir}/todorc.latest ${sysconfdir}/todorc
   73 fi
   74 echo
   75 echo
   76 EOF
   77 
   78 chmod +x install/doinst.sh
   79 
   80 /sbin/makepkg devtodo-${VERSION}-i386-1.tgz
   81 
   82 mv devtodo-${VERSION}-i386-1.tgz ${ORIGDIR}
   83 
   84 rm -rf ${PKGDIR}
   85 
   86 cd ${ORIGDIR}
   87 chown athomas.athomas ${PACKAGE}-${VERSION}-1.i386.rpm ${PACKAGE}-${VERSION}-1.src.rpm ${PACKAGE}-${VERSION}.tar.gz ${PACKAGE}-${VERSION}-i386-1.tgz
   88 
   89 cat << EOF
   90 
   91 
   92 ================================================================================
   93                            Package generation completed!
   94 ================================================================================
   95 
   96 
   97 EOF