Annotation of OpenXM/misc/packages/Linux/RPM/Makefile, Revision 1.18
1.18 ! takayama 1: # $OpenXM: OpenXM/misc/packages/Linux/RPM/Makefile,v 1.17 2000/09/05 07:28:02 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.17 takayama 76: # For rpm 2.*
77: # (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -bb openxm-shared.spec )
78: # For rpm 3.* or later
79: (cd work/SPECS ; rpm --target noarch-OpenXM-Linux -bb openxm-shared.spec )
1.14 takayama 80:
1.16 takayama 81: build-source-rpm: openxm-binary-spec openxm-shared-spec
1.14 takayama 82: (cd work/SPECS ; rpm -ba openxm-binary.spec )
1.17 takayama 83: # for rpm 2.*
84: # (cd work/SPECS ; rpm --buildarch noarch --buildos Linux -ba openxm-shared.spec )
85: # for rpm 3.* or later
86: (cd work/SPECS ; rpm --target noarch-OpenXM-Linux -ba openxm-shared.spec )
1.4 takayama 87:
88: ## This is obsolete
89: build-rpm: openxm-spec
1.2 takayama 90: (cd work/SPECS ; rpm -bb openxm.spec )
91:
1.1 takayama 92: make-directory: clean
93: mkdir work
94: mkdir work/SOURCES work/SPECS work/BUILD work/RPMS
1.17 takayama 95: mkdir work/RPMS/i386 work/RPMS/noarch work/SPRMS work/RPMS/ppc work/RPMS/sparc work/RPMS/alpha work/SRPMS
1.2 takayama 96: mkdir ${RPM_BUILD_BINARY_ROOT}
97: mkdir ${RPM_BUILD_BINARY_ROOT}/usr
98: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local
99: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/bin
100: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man
101: mkdir ${RPM_BUILD_BINARY_ROOT}/usr/local/man/man1
1.5 takayama 102: mkdir ${RPM_BUILD_SHARED_ROOT}
103: mkdir ${RPM_BUILD_SHARED_ROOT}/usr
104: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local
105: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/bin
106: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man
107: mkdir ${RPM_BUILD_SHARED_ROOT}/usr/local/man/man1
1.2 takayama 108:
109:
1.6 takayama 110: openxm-spec: make-ole
1.2 takayama 111: rm -rf work/SPECS/openxm.spec
112: ${OLE} <openxm.spec.in >work/SPECS/openxm.spec
1.4 takayama 113:
1.6 takayama 114: openxm-binary-spec: make-ole
1.4 takayama 115: rm -rf work/SPECS/openxm-binary.spec
116: ${OLE} <openxm-binary.spec.in >work/SPECS/openxm-binary.spec
117:
1.6 takayama 118: openxm-shared-spec: make-ole
1.4 takayama 119: rm -rf work/SPECS/openxm-shared.spec
120: ${OLE} <openxm-shared.spec.in >work/SPECS/openxm-shared.spec
1.6 takayama 121:
122: make-ole :
123: @if test ! -f ${OLE_DIR}/ole ; \
124: then \
125: (cd $(OLE_DIR) ; make ole) ; \
126: fi
1.1 takayama 127:
128: clean :
1.5 takayama 129: -/bin/rm -rf work ${RPM_BUILD_BINARY_ROOT} ${RPM_BUILD_SHARED_ROOT}
1.2 takayama 130:
131:
132: link-for-debug: make-directory clean
1.15 takayama 133: (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-fake.tar.gz ./openxm-$(VERSION).tar.gz)
1.2 takayama 134:
135: link-for-real-openxm: make-directory clean
1.15 takayama 136: (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-$(VERSION).tar.gz ./openxm-$(VERSION).tar.gz)
1.17 takayama 137:
138: link-for-fake-openxm: make-directory clean
139: (cd work/SOURCES ; rm -rf openxm-$(VERSION).tar.gz ; ln -s $(HOME)/tmp/openxm-fake.tar.gz ./openxm-$(VERSION).tar.gz)
140:
1.18 ! takayama 141: copy-to-ftp-area:
! 142: -scp work/RPMS/i386/openxm-*.rpm ${WHO}:${FTP_AREA}
! 143: -scp work/RPMS/noarch/openxm-*.rpm ${WHO}:${FTP_AREA}
! 144: -scp work/SRPMS/openxm-*.rpm ${WHO}:${FTP_AREA}
1.17 takayama 145:
146:
147:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>