- 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/dist
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.