- Timestamp:
- 03/17/08 11:35:12 (17 years ago)
- Branches:
- master, help
- Children:
- d593c5e
- Parents:
- 246900a
- git-author:
- pawelk <pawelk@…> (03/17/08 11:35:12)
- git-committer:
- pawelk <pawelk@…> (03/17/08 11:35:12)
- Location:
- app
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Makefile
r8d3e6ab rb2647de 14 14 export UTT_DIR=${OUTPUT_DIR} 15 15 16 export UTT_BIN_DIR=${UTT_DIR}/bin # executables 17 export UTT_CONF_DIR=${UTT_DIR}/etc/utt # configuration files 18 export UTT_LANG_DIR=${UTT_DIR}/share/utt # language/encoding specific stuff 19 export UTT_LIB_DIR=${UTT_DIR}/lib/utt # some files like ser.l.template, terms.m4 20 export UTT_SHARE_DIR=${UTT_DIR}/share # stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README 16 # executables 17 export UTT_BIN_DIR=${UTT_DIR}/bin 18 # configuration files 19 export UTT_CONF_DIR=${UTT_DIR}/etc/utt 20 # language/encoding specific stuff 21 export UTT_LANG_DIR=${UTT_DIR}/share/utt 22 # some files like ser.l.template, terms.m4 23 export UTT_LIB_DIR=${UTT_DIR}/lib/utt 24 # stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README 25 export UTT_SHARE_DIR=${UTT_DIR}/share 21 26 22 27 ############################## … … 43 48 mkdir -p ${UTT_LANG_DIR} 44 49 mkdir -p ${UTT_LIB_DIR} 45 mkdir -p ${UTT_SHARE_DIR} 50 mkdir -p ${UTT_SHARE_DIR}/utt 51 mkdir -p ${UTT_SHARE_DIR}/doc/utt 52 mkdir -p ${UTT_SHARE_DIR}/info 53 mkdir -p ${UTT_SHARE_DIR}/man/man3 46 54 47 55 .PHONY: components … … 68 76 .PHONY: clean_doc 69 77 clean_doc: 70 cd $(CUR_DIR)/doc && make clean 78 cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR) 71 79 72 80 .PHONY: clean_dist … … 78 86 # ------------------------------------------------------------------ 79 87 .PHONY: build 80 build: compile build_conf build_lib build_ share88 build: compile build_conf build_lib build_doc 81 89 @echo "All files builded successfully!" 82 90 83 91 .PHONY: build_conf 84 92 build_conf: 85 cp $(CUR_DIR)/conf/* $(UTT_CONF_DIR)/93 cp $(CUR_DIR)/conf/*.conf $(UTT_CONF_DIR)/ 86 94 87 95 .PHONY: build_lib … … 89 97 cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/ 90 98 91 .PHONY: build_ share92 build_ share:93 @echo "We need to create documentation here!"99 .PHONY: build_doc 100 build_doc: 101 cd $(CUR_DIR)/doc && make && make copy; cd $(CUR_DIR) 94 102 95 103 … … 99 107 # ------------------------------------------------------------------ 100 108 .PHONY: distribute 101 distribute: 102 @echo " We need to create distribution here!"109 distribute: build dist_tarball dist_rpm 110 @echo "All distributions created successfully!" 103 111 112 .PHONY: dist_tarball 113 dist_tarball: build 114 cd $(CUR_DIR)/dist && make tarball; cd $(CUR_DIR) 115 116 .PHONY: dist_rpm 117 dist_rpm: build 118 cd $(CUR_DIR)/dist && make rpm; cd $(CUR_DIR) 119 120 .PHONY: dist_deb 121 dist_deb: build 122 cd $(CUR_DIR)/dist && make deb; cd $(CUR_DIR) 104 123 105 124 -
app/dist/Makefile
r25ae32e rb2647de 1 # compile task doesn't compile sources, but just copy some files2 # this should be changed3 #4 1 5 # I put heresome variables2 # some variables 6 3 7 # path, where binaries are placed4 # path, where all nessesary files are placed 8 5 # (they will be processed for making distribution) 9 export _UTT_DIST_DIR=$(shell pwd)/bin 10 # path, where distribution file should be placed 11 export _UTT_DIST_OUTPUT=$(shell pwd) 6 export UTT_DIST_DIR=$(UTT_DIR) 7 # path, where distribution package will be placed 8 export UTT_DIST_OUTPUT=$(UTT_DIR)/.. 9 #temp path for making distribution 10 export UTT_DIST_TMP=$(shell pwd)/dist_tmp 12 11 13 12 … … 16 15 .PHONY: default 17 16 defaul: 18 @echo "Using: make compile|tarball|rpm|deb" 19 20 21 # ----------------------------------------------------------- 22 # ----------------------------------------------------------- 23 # this task should compile utt application 24 .PHONY: compile 25 compile: 26 if test -d ${_UTT_DIST_DIR}; then rm -fr ${_UTT_DIST_DIR}; fi 27 mkdir -p ${_UTT_DIST_DIR} 28 @# fake compilation 29 cp -r ../utt-0.9/* ${_UTT_DIST_DIR}/ 30 @# we add some extra file (required during instalation) 31 cp common/create_utt_config.pl ${_UTT_DIST_DIR}/ 32 chmod 700 ${_UTT_DIST_DIR}/create_utt_config.pl 17 @echo "Using: make tarball|rpm|deb" 33 18 34 19 … … 36 21 # this task should compile utt (if nesessery) and create tar.gz version 37 22 .PHONY: tarball 38 tarball: compile23 tarball: 39 24 cd tarball && make 40 25 … … 42 27 # this task should compile utt (if nesessery) and create rpm version 43 28 .PHONY: rpm 44 rpm: compile29 rpm: 45 30 @#we build rpm (see spec/README for details) 46 31 cd spec && make … … 49 34 # this task should compile utt (if nesessery) and create deb version 50 35 .PHONY: deb 51 deb: compile36 deb: 52 37 @#we build deb (see deb/README for details) 53 38 cd deb && make … … 58 43 clean: 59 44 # finally the line below should be uncomment 60 rm -fr ${ _UTT_DIST_DIR}45 rm -fr ${UTT_DIST_TMP} 61 46 -
app/dist/spec/Makefile
r25ae32e rb2647de 3 3 DIR=$(shell pwd) 4 4 5 ifndef _UTT_DIST_DIR6 _UTT_DIST_DIR=${DIR}5 ifndef UTT_DIST_DIR 6 UTT_DIST_DIR=${DIR} 7 7 endif 8 8 9 9 _RPM_FROOT=${DIR}/rmp_root 10 _UTT_ROOT=${_RPM_FROOT}/usr/local 10 11 # default task 11 12 .PHONY: rpm 12 13 rpm: 13 cd ${_UTT_DIST_DIR}; rpmbuild -bb ${DIR}/utt.spec 14 if test -d ${_RPM_FROOT}; then rm -fr ${_RMP_FROOT}; fi 15 mkdir -p ${_UTT_ROOT} 16 cp -rf ${UTT_DIST_DIR}/* ${_UTT_ROOT}/ 17 cp ../common/utt_make_config.pl ${_UTT_ROOT}/bin/ 18 chmod 755 ${_UTT_ROOT}/bin/utt_make_config.pl 19 cp ../files/* ${_UTT_ROOT}/ 20 cd ${_RPM_FROOT}; rpmbuild -bb ${DIR}/utt.spec 14 21 15 22 rm -rf ${_RPM_FROOT} 23 -
app/dist/spec/utt.spec
r25ae32e rb2647de 11 11 %define _this_summary Some tools for text processing 12 12 %define _this_name utt 13 %define _this_version %(cat ../ common/version.def)14 %define _this_release %(cat ../ common/release.def)13 %define _this_version %(cat ../../common/version.def) 14 %define _this_release %(cat ../../common/release.def) 15 15 %define _this_copyright Adam Mickiewicz University, Poland 16 17 #18 # We need some paths19 #20 # Directory with utt binaries21 %define _UTT_DIST_DIR %(pwd)22 #Root directory in which utt will be installed23 %define _UTT_DIR /usr/local/%_this_name24 #Directory for rpm25 %define _RPM_ROOT %_UTT_DIST_DIR/../rpm_root26 16 27 17 # … … 40 30 URL: http://utt.amu.edu.pl 41 31 Vendor: Adam Mickiewicz University 42 BuildRoot: %_RPM_ROOT32 BuildRoot: %(pwd) 43 33 #BuildArch: i586 44 34 # requirements for utt application … … 53 43 54 44 %description 55 %(cat ../ common/description.def)45 %(cat ../../common/description.def) 56 46 57 47 %description -l pl 58 %(cat ../ common/description.pl.def)48 %(cat ../../common/description.pl.def) 59 49 60 50 … … 68 58 # rpm building 69 59 %install 70 %__mkdir_p $RPM_BUILD_ROOT%_UTT_DIR71 cp -fr %_UTT_DIST_DIR/* $RPM_BUILD_ROOT%_UTT_DIR/72 73 60 74 61 # cleaning after rpm build 75 62 %clean 76 rm -rf $RPM_BUILD_ROOT77 63 78 64 # ------------------------------------------------------------- … … 80 66 %pre 81 67 82 83 68 #after installation 84 69 %post 85 70 # we need to create utt.conf file 86 %_UTT_DIR/create_utt_config.pl87 rm -f %_UTT_DIR/create_utt_config.pl88 # we need to create links in /usr/local/bin89 find %_UTT_DIR/bin/ -type f -exec ln -f {} /usr/local/bin \;90 91 71 92 72 #before uninstallation 93 73 %preun 94 # we delete links from /usr/local/bin95 for fn in `find %_UTT_DIR/bin/ -type f -exec basename {} \;`; do rm -f /usr/local/bin/$fn; done96 97 74 98 75 #after uninstallation 99 76 %postun 100 # we remove all extra files101 rm -fr %_UTT_DIR102 77 103 78 # ------------------------------------------------------------- -
app/dist/tarball/Makefile
r25ae32e rb2647de 5 5 # 6 6 7 DIR=$(shell pwd) 8 7 9 # Directory with utt binaries 8 ifndef _UTT_DIST_DIR9 _UTT_DIST_DIR=${DIR}10 ifndef UTT_DIST_DIR 11 UTT_DIST_DIR=${DIR} 10 12 endif 11 13 12 14 # Where put result 13 ifndef _UTT_DIST_OUTPUT14 _UTT_DIST_OUTPUT=${DIR}15 ifndef UTT_DIST_OUTPUT 16 UTT_DIST_OUTPUT=${DIR} 15 17 endif 16 18 … … 20 22 21 23 # Temp vars 22 DIR=$(shell pwd) 23 _TARBALL_ROOT=$(DIR)/utt_$(_UTT_VER)-$(_UTT_REL) 24 _TARBALL_ROOT=$(DIR)/utt-$(_UTT_VER).$(_UTT_REL) 24 25 _TAR_FILE_NAME=utt.$(_UTT_VER)_$(_UTT_REL).tar.gz 25 26 … … 27 28 .PHONY: default 28 29 default: 29 @echo Build dir is ${_UTT_DIST_DIR}30 @echo Change output for tarball as ${_UTT_DIST_OUTPUT}30 @echo Build directory: ${UTT_DIST_DIR} 31 @echo Output directory for tarball: ${UTT_DIST_OUTPUT} 31 32 mkdir -p ${_TARBALL_ROOT} 32 cp -fr ${ _UTT_DIST_DIR}/* ${_TARBALL_ROOT}33 cp -fr ${UTT_DIST_DIR}/* ${_TARBALL_ROOT} 33 34 @# we add some extra files 35 cp ../common/utt_make_config.pl ${_TARBALL_ROOT}/bin/ 36 chmod 755 ${_TARBALL_ROOT}/bin/utt_make_config.pl 34 37 cp ./INSTALL ${_TARBALL_ROOT}/ 38 cp ../files/* ${_TARBALL_ROOT}/ 35 39 36 tar -czf ${ _UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt*40 tar -czf ${UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt* 37 41 38 42 rm -rf ${_TARBALL_ROOT} 43 -
app/doc/Makefile
r25ae32e rb2647de 19 19 20 20 copy: 21 ifdef UTT_DOC_DIR 22 cp utt.{info,ps,pdf,html} ${UTT_DOC_DIR} 21 ifdef UTT_SHARE_DIR 22 # tworzymy archiwa (wymagane przez programy) 23 gzip --best utt.info 24 mv utt.info.gz ${UTT_SHARE_DIR}/info/ 25 26 # tworzymy archiwa (wymagane przez programy) 27 #gzip --best utt.man 28 #mv utt.man.gz ${UTT_SHARE_DIR}/man/man3/utt.gz.1 29 30 #pozostale dokumenty 31 mv utt.{ps,pdf,html} ${UTT_SHARE_DIR}/doc/utt/ 23 32 endif 24 33
Note: See TracChangeset
for help on using the changeset viewer.