Changeset b2647de for app/dist


Ignore:
Timestamp:
03/17/08 11:35:12 (17 years ago)
Author:
pawelk <pawelk@…>
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)
Message:

Poprawiłem skrypty, generujące dystrybucję tarball oraz rpm.
Można testować: make dist_tarball oraz make dist_rpm.

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@11 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

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 files 
    2 # this should be changed 
    3 # 
    41 
    5 # I put here some variables 
     2# some variables 
    63 
    7 # path, where binaries are placed  
     4# path, where all nessesary files are placed  
    85# (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) 
     6export UTT_DIST_DIR=$(UTT_DIR) 
     7# path, where distribution package will be placed 
     8export UTT_DIST_OUTPUT=$(UTT_DIR)/.. 
     9#temp path for making distribution 
     10export UTT_DIST_TMP=$(shell pwd)/dist_tmp 
    1211 
    1312 
     
    1615.PHONY: default 
    1716defaul: 
    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" 
    3318 
    3419 
     
    3621# this task should compile utt (if nesessery) and create tar.gz version 
    3722.PHONY: tarball 
    38 tarball: compile 
     23tarball: 
    3924        cd tarball && make 
    4025 
     
    4227# this task should compile utt (if nesessery) and create rpm version 
    4328.PHONY: rpm 
    44 rpm: compile 
     29rpm: 
    4530        @#we build rpm (see spec/README for details) 
    4631        cd spec && make 
     
    4934# this task should compile utt (if nesessery) and create deb version 
    5035.PHONY: deb 
    51 deb: compile 
     36deb: 
    5237        @#we build deb (see deb/README for details) 
    5338        cd deb && make 
     
    5843clean: 
    5944        # finally the line below should be uncomment 
    60         rm -fr ${_UTT_DIST_DIR} 
     45        rm -fr ${UTT_DIST_TMP} 
    6146 
  • app/dist/spec/Makefile

    r25ae32e rb2647de  
    33DIR=$(shell pwd) 
    44 
    5 ifndef _UTT_DIST_DIR 
    6         _UTT_DIST_DIR=${DIR} 
     5ifndef UTT_DIST_DIR 
     6        UTT_DIST_DIR=${DIR} 
    77endif 
    88 
    9  
     9_RPM_FROOT=${DIR}/rmp_root 
     10_UTT_ROOT=${_RPM_FROOT}/usr/local 
    1011# default task 
    1112.PHONY: rpm 
    1213rpm: 
    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 
    1421         
    15  
     22        rm -rf ${_RPM_FROOT} 
     23         
  • app/dist/spec/utt.spec

    r25ae32e rb2647de  
    1111%define _this_summary     Some tools for text processing 
    1212%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) 
    1515%define _this_copyright   Adam Mickiewicz University, Poland 
    16  
    17 # 
    18 # We need some paths 
    19 # 
    20 # Directory with utt binaries 
    21 %define _UTT_DIST_DIR   %(pwd) 
    22 #Root directory in which utt will be installed 
    23 %define _UTT_DIR                /usr/local/%_this_name 
    24 #Directory for rpm 
    25 %define _RPM_ROOT       %_UTT_DIST_DIR/../rpm_root 
    2616 
    2717# 
     
    4030URL:         http://utt.amu.edu.pl 
    4131Vendor:      Adam Mickiewicz University 
    42 BuildRoot:   %_RPM_ROOT 
     32BuildRoot:      %(pwd) 
    4333#BuildArch:      i586 
    4434# requirements for utt application 
     
    5343 
    5444%description 
    55 %(cat ../common/description.def) 
     45%(cat ../../common/description.def) 
    5646 
    5747%description -l pl 
    58 %(cat ../common/description.pl.def) 
     48%(cat ../../common/description.pl.def) 
    5949 
    6050 
     
    6858# rpm building 
    6959%install 
    70 %__mkdir_p $RPM_BUILD_ROOT%_UTT_DIR 
    71 cp -fr %_UTT_DIST_DIR/* $RPM_BUILD_ROOT%_UTT_DIR/ 
    72  
    7360 
    7461# cleaning after rpm build 
    7562%clean 
    76 rm -rf $RPM_BUILD_ROOT 
    7763 
    7864# ------------------------------------------------------------- 
     
    8066%pre 
    8167 
    82  
    8368#after installation 
    8469%post 
    8570# we need to create utt.conf file 
    86 %_UTT_DIR/create_utt_config.pl 
    87 rm -f %_UTT_DIR/create_utt_config.pl 
    88 # we need to create links in /usr/local/bin 
    89 find %_UTT_DIR/bin/ -type f -exec ln -f {} /usr/local/bin \; 
    90  
    9171 
    9272#before uninstallation 
    9373%preun 
    94 # we delete links from /usr/local/bin 
    95 for fn in `find %_UTT_DIR/bin/ -type f -exec basename {} \;`; do rm -f /usr/local/bin/$fn; done 
    96  
    9774 
    9875#after uninstallation 
    9976%postun 
    100 # we remove all extra files 
    101 rm -fr %_UTT_DIR 
    10277 
    10378# ------------------------------------------------------------- 
  • app/dist/tarball/Makefile

    r25ae32e rb2647de  
    55# 
    66 
     7DIR=$(shell pwd) 
     8 
    79# Directory with utt binaries 
    8 ifndef _UTT_DIST_DIR 
    9         _UTT_DIST_DIR=${DIR} 
     10ifndef UTT_DIST_DIR 
     11        UTT_DIST_DIR=${DIR} 
    1012endif 
    1113 
    1214# Where put result 
    13 ifndef _UTT_DIST_OUTPUT 
    14         _UTT_DIST_OUTPUT=${DIR} 
     15ifndef UTT_DIST_OUTPUT 
     16        UTT_DIST_OUTPUT=${DIR} 
    1517endif 
    1618 
     
    2022 
    2123# Temp vars 
    22 DIR=$(shell pwd) 
    23 _TARBALL_ROOT=$(DIR)/utt_$(_UTT_VER)-$(_UTT_REL) 
     24_TARBALL_ROOT=$(DIR)/utt-$(_UTT_VER).$(_UTT_REL) 
    2425_TAR_FILE_NAME=utt.$(_UTT_VER)_$(_UTT_REL).tar.gz 
    2526 
     
    2728.PHONY: default 
    2829default: 
    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} 
    3132        mkdir -p ${_TARBALL_ROOT} 
    32         cp -fr ${_UTT_DIST_DIR}/* ${_TARBALL_ROOT} 
     33        cp -fr ${UTT_DIST_DIR}/* ${_TARBALL_ROOT} 
    3334        @# 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 
    3437        cp ./INSTALL ${_TARBALL_ROOT}/ 
     38        cp ../files/* ${_TARBALL_ROOT}/ 
    3539 
    36         tar -czf ${_UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt* 
     40        tar -czf ${UTT_DIST_OUTPUT}/${_TAR_FILE_NAME} utt* 
    3741 
    3842        rm -rf ${_TARBALL_ROOT} 
     43 
Note: See TracChangeset for help on using the changeset viewer.