Annotation of OpenXM/misc/packages/Linux/RPM/Makefile, Revision 1.13
1.13 ! takayama 1: # $OpenXM: OpenXM/misc/packages/Linux/RPM/Makefile,v 1.12 2000/03/24 08:48:15 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 "
56: @echo "make-directory"
57: @echo "link-for-real-openxm "
1.1 takayama 58:
1.4 takayama 59: build-binary-rpm: openxm-binary-spec
60: (cd work/SPECS ; rpm -bb openxm-binary.spec )
61:
62: build-shared-rpm: openxm-shared-spec
1.9 takayama 63: (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -bb openxm-shared.spec )
1.4 takayama 64:
65: ## This is obsolete
66: build-rpm: openxm-spec
1.2 takayama 67: (cd work/SPECS ; rpm -bb openxm.spec )
68:
1.1 takayama 69: make-directory: clean
70: mkdir work
71: mkdir work/SOURCES work/SPECS work/BUILD work/RPMS
1.12 takayama 72: mkdir work/RPMS/i386 work/RPMS/noarch work/SPRMS work/RPMS/ppc work/RPMS/sparc work/RPMS/alpha
1.2 takayama 73: mkdir ${RPM_BUILD_BINARY_ROOT}
74: mkdir ${RPM_BUILD_BINARY_ROOT}/usr
75: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local
76: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/bin
77: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man
78: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man/man1
1.5 takayama 79: mkdir ${RPM_BUILD_SHARED_ROOT}
80: mkdir ${RPM_BUILD_SHARED_ROOT}/usr
81: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local
82: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/bin
83: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man
84: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man/man1
1.2 takayama 85:
86:
1.6 takayama 87: openxm-spec: make-ole
1.2 takayama 88: rm -rf work/SPECS/openxm.spec
89: ${OLE} <openxm.spec.in >work/SPECS/openxm.spec
1.4 takayama 90:
1.6 takayama 91: openxm-binary-spec: make-ole
1.4 takayama 92: rm -rf work/SPECS/openxm-binary.spec
93: ${OLE} <openxm-binary.spec.in >work/SPECS/openxm-binary.spec
94:
1.6 takayama 95: openxm-shared-spec: make-ole
1.4 takayama 96: rm -rf work/SPECS/openxm-shared.spec
97: ${OLE} <openxm-shared.spec.in >work/SPECS/openxm-shared.spec
1.6 takayama 98:
99: make-ole :
100: @if test ! -f ${OLE_DIR}/ole ; \
101: then \
102: (cd $(OLE_DIR) ; make ole) ; \
103: fi
1.1 takayama 104:
105: clean :
1.5 takayama 106: -/bin/rm -rf work ${RPM_BUILD_BINARY_ROOT} ${RPM_BUILD_SHARED_ROOT}
1.2 takayama 107:
108:
109: link-for-debug: make-directory clean
110: (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)
111:
112: link-for-real-openxm: make-directory clean
113: (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>