Annotation of OpenXM/misc/packages/Linux/Debian2/Makefile-alien, Revision 1.1
1.1 ! takayama 1: MY_PROJECT=openxm
! 2: ##OpenXM_HOME=/usr/local/OpenXM
! 3: KM_INSTALL=${HOME}/tmp/km-install2
! 4: KM_TESTING=${HOME}/tmp/km-testing2
! 5: KM_DIST=${HOME}/tmp/km-dist2
! 6: FE_KNOPPIX_MATH=nobuki@fe.math.kobe-u.ac.jp:/usr/local/www/data/MathLibre
! 7: FE_KNOPPIX_MATH64=nobuki@fe.math.kobe-u.ac.jp:/usr/local/www/data/MathLibre-amd64
! 8: FE_KNOPPIX_MATH_SRC=nobuki@fe.math.kobe-u.ac.jp:/usr/local/www/data/MathLibre-src
! 9: DISTDIR=${KM_DIST}/${MY_PROJECT}
! 10: FETCH=${OpenXM_HOME}/bin/oxfetch.sh
! 11: RM = /bin/rm
! 12:
! 13: SUDO=sudo
! 14: ## visudo
! 15: ## If you need to make install-build-depends by yourself, add
! 16: ## your_user_name *=NOPASSWD:/usr/bin/apt-get, /usr/bin/patch
! 17: ## by visudo.
! 18:
! 19: PKG_NAME=${MY_PROJECT}.tar.gz
! 20:
! 21: MASTER_SITE1=http://fe.math.kobe-u.ac.jp/MathLibre-src
! 22: DISTNAME=openxm
! 23: NEWDISTNAME=openxm-1.3.2-5
! 24: DISTFILES1=
! 25: DISTFILES2=
! 26: LEMON_USER=taka
! 27:
! 28: BUILD_DEPENDS=fakeroot alien
! 29:
! 30: usage:
! 31: @echo "Before using this Makefile, build the package by Makefile"
! 32: @echo "If dpkg -c ../openxm*.deb does not contain all files,"
! 33: @echo "use this Makefile to generate deb package from debian/tmp/usr/*"
! 34: @echo "Target: build-deb"
! 35:
! 36: # make install-build-depends by hand before everything.
! 37: all : build
! 38:
! 39: show-const:
! 40: @echo "----- show constants --------------------"
! 41: @echo "OpenXM_HOME=${OpenXM_HOME}"
! 42: @echo "DISTDIR=${DISTDIR}"
! 43: @echo "-----------------------------------------"
! 44: fetch: show-const
! 45: mkdir -p ${KM_INSTALL}
! 46: mkdir -p ${KM_TESTING}
! 47: mkdir -p ${KM_DIST}
! 48: mkdir -p work
! 49: mkdir -p work/${NEWDISTNAME}
! 50: mkdir -p work/usr/bin
! 51: @touch work/.fetch_done
! 52:
! 53: extract: fetch
! 54: @touch work/.extract_done
! 55:
! 56: install-build-depends:
! 57: @touch work/.install-build-depends_done
! 58:
! 59: apply-patch:
! 60: @touch work/.apply-patch_done
! 61:
! 62: configure: extract apply-patch
! 63: @touch work/.configure_done
! 64:
! 65: build : configure
! 66: @touch work/.build_done
! 67:
! 68: install: build
! 69: @if [ ! -f work/.install_done ]; then \
! 70: (cd debian/tmp ; tar cf - usr ) | (cd work ; tar xvf -) ; \
! 71: fi
! 72: @touch work/.install_done
! 73: install-doc: install
! 74: @touch work/.install-doc_done
! 75:
! 76: build-tar-fakeroot: install install-doc
! 77: mkdir -p ${KM_INSTALL}
! 78: @if [ ! -f work/.build-tar-fakeroot_done ]; then \
! 79: (cd work; chown -R root usr ; tar czvf ${KM_INSTALL}/${PKG_NAME} usr ) ; \
! 80: echo "Tar is at ${KM_INSTALL}/${PKG_NAME}" ; \
! 81: fi
! 82: @touch work/.build-tar-fakeroot_done
! 83:
! 84: build-tar: build-tar-fakeroot
! 85: mkdir -p ${KM_INSTALL}
! 86: @if [ ! -f work/.build-tar_done ]; then \
! 87: fakeroot make -f Makefile-alien build-tar-fakeroot ; \
! 88: fi
! 89: @touch work/.build-tar_done
! 90:
! 91: # -X is used to avoid compressing pdf files, ...
! 92: build-deb: build-tar
! 93: @if [ ! -f work/.build-deb_done ]; then \
! 94: (cd ${KM_INSTALL} ; rm -rf ${MY_PROJECT}*.deb ${MY_PROJECT}-1) ; \
! 95: (cd ${KM_INSTALL} ; fakeroot alien -g ${PKG_NAME} ) ; \
! 96: (cp patch/control ${KM_INSTALL}/${MY_PROJECT}-1/debian ) ; \
! 97: (cp patch/copyright ${KM_INSTALL}/${MY_PROJECT}-1/debian ) ; \
! 98: (cp patch/changelog ${KM_INSTALL}/${MY_PROJECT}-1/debian ) ; \
! 99: (cd ${KM_INSTALL}/${MY_PROJECT}-1/debian ; mv rules rules.orig ; sed -e 's/dh_compress/dh_compress -X.pdf -X.c -X.ine -X.ext -X.html -XMakefile/g' rules.orig >rules ; chmod +x rules ) ; \
! 100: (cd ${KM_INSTALL}/${MY_PROJECT}-1 ; fakeroot make -f debian/rules binary ) ; \
! 101: (cd ${KM_INSTALL} ; dpkg-deb --contents ${MY_PROJECT}*.deb ; dpkg-deb --info ${MY_PROJECT}*.deb ) ; \
! 102: fi
! 103: @touch work/.build-deb_done
! 104: @echo "deb is under ${KM_INSTALL}"
! 105:
! 106: copy-deb-fe: build-deb
! 107: @if [ ! -f work/.copy-deb-fe_done ]; then \
! 108: if [ $$HOSTTYPE = "x86_64" ]; then \
! 109: echo "64" ; \
! 110: (cd ${KM_INSTALL} ; scp ${MY_PROJECT}*deb ${FE_KNOPPIX_MATH64} ); \
! 111: else \
! 112: echo "32" ; \
! 113: (cd ${KM_INSTALL} ; scp ${MY_PROJECT}*deb ${FE_KNOPPIX_MATH} ); \
! 114: fi ; \
! 115: echo "(Move old deb to ~/tmp/KnoppixMath-Attic in ~/tmp/DVD3 and ) Do Update-package.sh" ; \
! 116: fi
! 117: @touch work/.copy-deb-fe_done
! 118:
! 119:
! 120: clean:
! 121: -$(RM) -rf work ${KM_INSTALL}/${MY_PROJECT}* ${KM_TESTING}/${MY_PROJECT}*
! 122:
! 123:
! 124:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>