[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.19

1.19    ! takayama    1: # $OpenXM: OpenXM/misc/packages/Linux/RPM/Makefile,v 1.18 2000/09/05 08:45:06 takayama Exp $
1.15      takayama    2:
                      3: #Edit this.  VERSION number must be compatible between Generic/openxm/Makefile
                      4: # and *.spec.in
                      5: VERSION=1.1.3
                      6:
1.18      takayama    7: ## configuration only for committers
                      8: WHO=taka@orange
                      9: FTP_AREA=/export/home01/ftp/pub/OpenXM/${VERSION}
                     10:
1.3       takayama   11: # *If you do not like to use /usr/src/redhat area to put *rpm files,
                     12: #  do as follows.
1.13      takayama   13: # 0. If your rpm version is less than 3,
                     14: #      Generate ~/.rpmrc and set the TopDir for the work.
                     15: #      Here is my .rpmrc
1.1       takayama   16: #
1.13      takayama   17: #      TopDir: home/taka/OpenXM/misc/packages/Linux/RPM/work
                     18: #    If you rpm version is more than or equal to 3,
                     19: #      Generate ~/.rpmmacros and set the %_topdir for the work.
                     20: #      Here is my .rpmmacros
                     21: #
1.16      takayama   22: #      %_topdir  /home/taka/OpenXM/misc/packages/Linux/RPM/work
1.2       takayama   23: #
1.1       takayama   24: #  [ To extract a source from *src.rpm to SOURCES dir,
                     25: #    type in "make make-directory" and "rpm -i your.src.rpm" ]
1.2       takayama   26: #
                     27: # *How to build a binary package.
                     28: # 1. Make ole by make ole at  $(OpenXM_HOME)/src/kan96xx/Doc.
                     29: #    [ ole.c will be moved to somewhere else in a future. ]
                     30: # 2. Make a directory ~/tmp if you do not have.
1.15      takayama   31: # 3. Generate a source tar ball openxm-$(VERSION).tar.gz by
                     32: #     cd $(OpenXM_HOME)/misc/packages/Generic/openxm ; make tar-ball
1.2       takayama   33: # 4. Type in make link-for-real-openxm
1.3       takayama   34: # 5. Type in make build-binary-rpm  (for test)
                     35: # REAL 5. Edit openxm.spec.in and remove the line BuildRoot.
                     36: #          Su and type in make build-binary-rpm
                     37: #         work should be removed by the super user.
1.2       takayama   38: # The binary package will be generated at  work/RPMS/i386.
                     39: #
                     40: # Example 1 :  debug this Makefile and openxm.spec.in
1.15      takayama   41: #  cd $(OpenXM_HOME)/misc/packages/FreeBSD/openxm-$(VERSION) ; make fake-openxm
1.2       takayama   42: #  make link-for-debug
                     43: #  make build-binary-rpm
                     44: #
                     45: # *To check the file names in the package
1.15      takayama   46: #  rpm2cpio openxm-$(VERSION)-test.i386.rpm | cpio -tv | more
1.2       takayama   47: # or
1.15      takayama   48: #  rpm -qvlp openxm-$(VERSION)-test.i386.rpm
1.2       takayama   49: #
1.15      takayama   50: #  -ivh : Install,  -e openxm-$(VERSION)-test : remove,
                     51: #  -qvl openxm-$(VERSION)-test : list.
1.10      takayama   52: #
                     53: #  The maximum rpm at http://rpm.redhat.com is the most comprehensive source
                     54: #  to use rpm to build redhat packages.
1.2       takayama   55:
1.6       takayama   56: OLE_DIR=../../../../../OpenXM/src/kan96xx/Doc
                     57: OLE=${OLE_DIR}/ole -q
1.5       takayama   58: RPM_BUILD_BINARY_ROOT=/var/tmp/openxm-binary-root
                     59: RPM_BUILD_SHARED_ROOT=/var/tmp/openxm-shared-root
1.1       takayama   60:
                     61: usage :
1.4       takayama   62:        @echo "Usage:"
                     63:        @echo "build-binary-rpm "
                     64:        @echo "build-shared-rpm "
1.14      takayama   65:        @echo "build-source-rpm "
1.4       takayama   66:        @echo "make-directory"
                     67:        @echo "link-for-real-openxm "
1.17      takayama   68:        @echo "link-for-fake-openxm "
1.18      takayama   69:        @echo "copy-to-ftp-area "
                     70:        @echo "clean"
1.1       takayama   71:
1.4       takayama   72: build-binary-rpm: openxm-binary-spec
                     73:        (cd work/SPECS ; rpm -bb openxm-binary.spec )
                     74:
                     75: build-shared-rpm: openxm-shared-spec
1.19    ! takayama   76:        rm -f /tmp/tmp-rpm-version.t
        !            77:        rpm --version | awk '{print $$3}' >/tmp/tmp-rpm-version.t
        !            78:        if test "2.5.5" = `cat /tmp/tmp-rpm-version.t` ; then \
        !            79:        echo "for rpm 2.x on FreeBSD 3.x" ; \
        !            80:        (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -bb openxm-shared.spec ) ; \
        !            81:        else \
        !            82:        echo "for  rpm 3.x" ; \
        !            83:        (cd work/SPECS ; rpm --target noarch-OpenXM-Linux -bb openxm-shared.spec ) ; \
        !            84:        fi
1.14      takayama   85:
1.16      takayama   86: build-source-rpm:  openxm-binary-spec openxm-shared-spec
1.14      takayama   87:        (cd work/SPECS ; rpm -ba openxm-binary.spec )
1.19    ! takayama   88:        rm -f /tmp/tmp-rpm-version.t
        !            89:        rpm --version | awk '{print $$3}' >/tmp/tmp-rpm-version.t
        !            90:        if test "2.5.5" = `cat /tmp/tmp-rpm-version.t` ; then \
        !            91:        echo " for rpm 2.x on FreeBSD 3.x" ; \
        !            92:        (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -ba openxm-shared.spec ) ; \
        !            93:        else \
        !            94:        echo " for rpm 3.x " ; \
        !            95:        (cd work/SPECS ; rpm --target noarch-OpenXM-Linux -ba openxm-shared.spec ) ; \
        !            96:        fi
1.4       takayama   97:
                     98: ## This is obsolete
                     99: build-rpm: openxm-spec
1.2       takayama  100:        (cd work/SPECS ; rpm -bb openxm.spec )
                    101:
1.1       takayama  102: make-directory: clean
                    103:        mkdir work
                    104:        mkdir work/SOURCES work/SPECS work/BUILD work/RPMS
1.17      takayama  105:        mkdir work/RPMS/i386 work/RPMS/noarch work/SPRMS work/RPMS/ppc work/RPMS/sparc work/RPMS/alpha work/SRPMS
1.2       takayama  106:        mkdir ${RPM_BUILD_BINARY_ROOT}
                    107:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr
                    108:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local
                    109:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/bin
                    110:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man
                    111:        mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man/man1
1.5       takayama  112:        mkdir ${RPM_BUILD_SHARED_ROOT}
                    113:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr
                    114:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local
                    115:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/bin
                    116:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man
                    117:        mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man/man1
1.2       takayama  118:
                    119:
1.6       takayama  120: openxm-spec:  make-ole
1.2       takayama  121:        rm -rf work/SPECS/openxm.spec
                    122:        ${OLE} <openxm.spec.in >work/SPECS/openxm.spec
1.4       takayama  123:
1.6       takayama  124: openxm-binary-spec: make-ole
1.4       takayama  125:        rm -rf work/SPECS/openxm-binary.spec
                    126:        ${OLE} <openxm-binary.spec.in >work/SPECS/openxm-binary.spec
                    127:
1.6       takayama  128: openxm-shared-spec: make-ole
1.4       takayama  129:        rm -rf work/SPECS/openxm-shared.spec
                    130:        ${OLE} <openxm-shared.spec.in >work/SPECS/openxm-shared.spec
1.6       takayama  131:
                    132: make-ole :
                    133:        @if test ! -f ${OLE_DIR}/ole ; \
                    134:        then \
                    135:                (cd $(OLE_DIR) ; make ole) ;  \
                    136:        fi
1.1       takayama  137:
                    138: clean :
1.5       takayama  139:        -/bin/rm -rf work ${RPM_BUILD_BINARY_ROOT} ${RPM_BUILD_SHARED_ROOT}
1.2       takayama  140:
                    141:
                    142: link-for-debug: make-directory clean
1.15      takayama  143:        (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-fake.tar.gz ./openxm-$(VERSION).tar.gz)
1.2       takayama  144:
                    145: link-for-real-openxm: make-directory clean
1.15      takayama  146:        (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-$(VERSION).tar.gz ./openxm-$(VERSION).tar.gz)
1.17      takayama  147:
                    148: link-for-fake-openxm: make-directory clean
                    149:        (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-fake.tar.gz ./openxm-$(VERSION).tar.gz)
                    150:
1.18      takayama  151: copy-to-ftp-area:
                    152:        -scp work/RPMS/i386/openxm-*.rpm ${WHO}:${FTP_AREA}
                    153:        -scp work/RPMS/noarch/openxm-*.rpm ${WHO}:${FTP_AREA}
                    154:        -scp work/SRPMS/openxm-*.rpm ${WHO}:${FTP_AREA}
1.17      takayama  155:
                    156:
                    157:

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