[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / misc / packages / Linux / RPM

Annotation of OpenXM/misc/packages/Linux/RPM/Makefile, Revision 1.11

1.11    ! takayama    1: # $OpenXM: OpenXM/misc/packages/Linux/RPM/Makefile,v 1.10 2000/03/16 09:36:13 takayama Exp $
1.3       takayama    2: # *If you do not like to use /usr/src/redhat area to put *rpm files,
                      3: #  do as follows.
1.2       takayama    4: # 0. Generate ~/.rpmrc and set the TopDir for the work.
                      5: #    Here is my .rpmrc
1.1       takayama    6: #
                      7: #    TopDir: home/taka/OpenXM/misc/packages/Linux/RPM/work
1.2       takayama    8: #
1.1       takayama    9: #  [ To extract a source from *src.rpm to SOURCES dir,
                     10: #    type in "make make-directory" and "rpm -i your.src.rpm" ]
1.2       takayama   11: #
                     12: # *How to build a binary package.
                     13: # 1. Make ole by make ole at  $(OpenXM_HOME)/src/kan96xx/Doc.
                     14: #    [ ole.c will be moved to somewhere else in a future. ]
                     15: # 2. Make a directory ~/tmp if you do not have.
                     16: # 3. Generate a source tar ball openxm-1.1.2.tar.gz by
                     17: #     cd $(OpenXM_HOME)/misc/packages/FreeBSD/openxm-1.1.2 ; make make-tar-ball
                     18: # 4. Type in make link-for-real-openxm
1.3       takayama   19: # 5. Type in make build-binary-rpm  (for test)
                     20: # REAL 5. Edit openxm.spec.in and remove the line BuildRoot.
                     21: #          Su and type in make build-binary-rpm
                     22: #         work should be removed by the super user.
1.2       takayama   23: # The binary package will be generated at  work/RPMS/i386.
                     24: #
                     25: # Example 1 :  debug this Makefile and openxm.spec.in
                     26: #  cd $(OpenXM_HOME)/misc/packages/FreeBSD/openxm-1.1.2 ; make fake-openxm
                     27: #  make link-for-debug
                     28: #  make build-binary-rpm
                     29: #
                     30: # *To check the file names in the package
                     31: #  rpm2cpio openxm-1.1.2-test.i386.rpm | cpio -tv | more
                     32: # or
                     33: #  rpm -qvlp openxm-1.1.2-test.i386.rpm
                     34: #
                     35: #  -ivh : Install,  -e openxm-1.1.2-test : remove,
                     36: #  -qvl openxm-1.1.2-test : list.
1.10      takayama   37: #
                     38: #  The maximum rpm at http://rpm.redhat.com is the most comprehensive source
                     39: #  to use rpm to build redhat packages.
1.2       takayama   40:
1.6       takayama   41: OLE_DIR=../../../../../OpenXM/src/kan96xx/Doc
                     42: OLE=${OLE_DIR}/ole -q
1.5       takayama   43: RPM_BUILD_BINARY_ROOT=/var/tmp/openxm-binary-root
                     44: RPM_BUILD_SHARED_ROOT=/var/tmp/openxm-shared-root
1.1       takayama   45:
                     46: usage :
1.4       takayama   47:        @echo "Usage:"
                     48:        @echo "build-binary-rpm "
                     49:        @echo "build-shared-rpm "
                     50:        @echo "make-directory"
                     51:        @echo "link-for-real-openxm "
1.1       takayama   52:
1.4       takayama   53: build-binary-rpm: openxm-binary-spec
                     54:        (cd work/SPECS ; rpm -bb openxm-binary.spec )
                     55:
                     56: build-shared-rpm: openxm-shared-spec
1.9       takayama   57:        (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -bb openxm-shared.spec )
1.4       takayama   58:
                     59: ## This is obsolete
                     60: build-rpm: openxm-spec
1.2       takayama   61:        (cd work/SPECS ; rpm -bb openxm.spec )
                     62:
1.1       takayama   63: make-directory: clean
                     64:        mkdir work
                     65:        mkdir work/SOURCES work/SPECS work/BUILD work/RPMS
1.11    ! takayama   66:        mkdir work/RPMS/i386 work/RPMS/noarch work/SPRMS work/RPMS/ppc work/RPMS/sparc
1.2       takayama   67:        mkdir ${RPM_BUILD_BINARY_ROOT}
                     68:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr
                     69:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local
                     70:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/bin
                     71:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man
                     72:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man/man1
1.5       takayama   73:        mkdir ${RPM_BUILD_SHARED_ROOT}
                     74:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr
                     75:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local
                     76:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/bin
                     77:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man
                     78:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man/man1
1.2       takayama   79:
                     80:
1.6       takayama   81: openxm-spec:  make-ole
1.2       takayama   82:        rm -rf work/SPECS/openxm.spec
                     83:        ${OLE} <openxm.spec.in >work/SPECS/openxm.spec
1.4       takayama   84:
1.6       takayama   85: openxm-binary-spec: make-ole
1.4       takayama   86:        rm -rf work/SPECS/openxm-binary.spec
                     87:        ${OLE} <openxm-binary.spec.in >work/SPECS/openxm-binary.spec
                     88:
1.6       takayama   89: openxm-shared-spec: make-ole
1.4       takayama   90:        rm -rf work/SPECS/openxm-shared.spec
                     91:        ${OLE} <openxm-shared.spec.in >work/SPECS/openxm-shared.spec
1.6       takayama   92:
                     93: make-ole :
                     94:        @if test ! -f ${OLE_DIR}/ole ; \
                     95:        then \
                     96:                (cd $(OLE_DIR) ; make ole) ;  \
                     97:        fi
1.1       takayama   98:
                     99: clean :
1.5       takayama  100:        -/bin/rm -rf work ${RPM_BUILD_BINARY_ROOT} ${RPM_BUILD_SHARED_ROOT}
1.2       takayama  101:
                    102:
                    103: link-for-debug: make-directory clean
                    104:        (cd work/SOURCES ; rm -rf openxm-1.1.2.tar.gz ; ln -s $(HOME)/tmp/openxm-fake.tar.gz ./openxm-1.1.2.tar.gz)
                    105:
                    106: link-for-real-openxm: make-directory clean
                    107:        (cd work/SOURCES ; rm -rf openxm-1.1.2.tar.gz ; ln -s $(HOME)/tmp/openxm-1.1.2.tar.gz ./openxm-1.1.2.tar.gz)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>