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