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