source: common/libs/func_blfs_deps@ 9bbf240

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since 9bbf240 was 3e7ceed, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Ported CUSTOM_TOOLS support to all books.

  • Property mode set to 100644
File size: 6.4 KB
RevLine 
[fe30c61]1#!/bin/bash
2
3# $Id$
4
5#----------------------------# Hardcoded URLs and MD5.
6add_blfs_deps_urls() { # No easy way to extract it.
7#----------------------------# Some FTP mirrors may not work
8
9 local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
10
11 if [[ "${DEP_LIBXML}" = "y" ]] ; then
12 echo "${LIBXML_URL} ${BLFS_SERVER}libxml2/${LIBXML_PKG} ${LIBXML_MD5}" >> urls.lst
13 fi
14
15 if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
16 echo "${LIBXSLT_URL} ${BLFS_SERVER}libxslt/${LIBXSLT_PKG} ${LIBXSLT_MD5}" >> urls.lst
17 fi
18
19 if [[ "${DEP_TIDY}" = "y" ]] ; then
20 echo "${TIDY_URL} ${BLFS_SERVER}tidy/${TIDY_PKG} ${TIDY_MD5}" >> urls.lst
21 echo "${TIDY_PATCH_URL} ${BLFS_SERVER}tidy/${TIDY_PATCH} ${TIDY_PATCH_MD5}" >> urls.lst
22 echo "${TIDY_DOCS_URL} ${BLFS_SERVER}tidy/${TIDY_DOCS} ${TIDY_DOCS_MD5}" >> urls.lst
23 fi
24
25 if [[ "${DEP_UNZIP}" = "y" ]] ; then
26 echo "${UNZIP_URL} ${BLFS_SERVER}unzip/${UNZIP_PKG} ${UNZIP_MD5}" >> urls.lst
27 fi
28
29 if [[ "${DEP_DBXML}" = "y" ]] ; then
30 echo "${DBXML_URL} ${BLFS_SERVER}docbook-xml/${DBXML_PKG} ${DBXML_MD5}" >> urls.lst
31 fi
32
33 if [[ "${DEP_DBXSL}" = "y" ]] ; then
34 echo "${DBXSL_URL} ${BLFS_SERVER}docbook-xsl/${DBXSL_PKG} ${DBXSL_MD5}" >> urls.lst
35 fi
36
37 if [[ "${DEP_LINKS}" = "y" ]] ; then
38 echo "${LINKS_URL} ${BLFS_SERVER}links/${LINKS_PKG} ${LINKS_MD5}" >> urls.lst
39 fi
40
41 if [[ "${DEP_SUDO}" = "y" ]] ; then
42 echo "${SUDO_URL} ${BLFS_SERVER}sudo/${SUDO_PKG} ${SUDO_MD5}" >> urls.lst
43 echo "${SUDO_PATCH_URL} ${BLFS_SERVER}sudo/${SUDO_PATCH} ${SUDO_PATCH_MD5}" >> urls.lst
44 fi
45
46 if [[ "${DEP_WGET}" = "y" ]] ; then
47 echo "${WGET_URL} ${BLFS_SERVER}wget/${WGET_PKG} ${WGET_MD5}" >> urls.lst
48 fi
49
50 if [[ "${DEP_SVN}" = "y" ]] ; then
51 echo "${SVN_URL} ${BLFS_SERVER}subversion/${SVN_PKG} ${SVN_MD5}" >> urls.lst
52 fi
53
54 if [[ "${DEP_GPM}" = "y" ]] ; then
55 echo "${GPM_URL} ${BLFS_SERVER}gpm/${GPM_PKG} ${GPM_MD5}" >> urls.lst
56 echo "${GPM_PATCH_1_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_1} ${GPM_PATCH_1_MD5}" >> urls.lst
57 echo "${GPM_PATCH_2_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_2} ${GPM_PATCH_2_MD5}" >> urls.lst
58 fi
59
60}
61
62#----------------------------# Maybe there is a better way to do this, but this
63copy_blfs_deps_scripts() { # method avoid to place the test on all
64#----------------------------# $PROGNAME/master.sh scripts.
65
66 mkdir -p ${PROGNAME}-commands/blfs-tool-deps
67
68 if [[ "${DEP_LIBXML}" = "y" ]] ; then
69 mv blfs-tool-deps/901-libxml2 ${PROGNAME}-commands/blfs-tool-deps
70 fi
71
72 if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
73 mv blfs-tool-deps/902-libxslt ${PROGNAME}-commands/blfs-tool-deps
74 fi
75
76 if [[ "${DEP_TIDY}" = "y" ]] ; then
77 mv blfs-tool-deps/903-tidy ${PROGNAME}-commands/blfs-tool-deps
78 fi
79
80 if [[ "${DEP_UNZIP}" = "y" ]] ; then
81 mv blfs-tool-deps/904-unzip ${PROGNAME}-commands/blfs-tool-deps
82 fi
83
84 if [[ "${DEP_DBXML}" = "y" ]] ; then
85 mv blfs-tool-deps/905-docbook-xml ${PROGNAME}-commands/blfs-tool-deps
86 fi
87
88 if [[ "${DEP_DBXSL}" = "y" ]] ; then
89 mv blfs-tool-deps/906-docbook-xsl ${PROGNAME}-commands/blfs-tool-deps
90 fi
91
92 if [[ "${DEP_LINKS}" = "y" ]] ; then
93 mv blfs-tool-deps/908-links ${PROGNAME}-commands/blfs-tool-deps
94 fi
95
96 if [[ "${DEP_SUDO}" = "y" ]] ; then
97 mv blfs-tool-deps/909-sudo ${PROGNAME}-commands/blfs-tool-deps
98 fi
99
100 if [[ "${DEP_WGET}" = "y" ]] ; then
101 mv blfs-tool-deps/910-wget ${PROGNAME}-commands/blfs-tool-deps
102 fi
103
104 if [[ "${DEP_SVN}" = "y" ]] ; then
105 mv blfs-tool-deps/911-subversion ${PROGNAME}-commands/blfs-tool-deps
106 fi
107
108 if [[ "${DEP_GPM}" = "y" ]] ; then
109 mv blfs-tool-deps/907-gpm ${PROGNAME}-commands/blfs-tool-deps
110 fi
111
112 rm -rf blfs-tool-deps
113
114}
115
116
117#----------------------------------#
118wrt_blfs_tool_targets() { #
119#----------------------------------#
[3e7ceed]120 PREV=""
[fe30c61]121
122 echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}"
123
124 for file in blfs-tool-deps/* ; do
125 # Keep the script file name
126 this_script=`basename $file`
127
128 # Grab the name of the target
129 name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
130
131 # Find the package.
132 case $name in
133 tidy ) pkg_tarball=${TIDY_PKG} ;;
134 unzip ) pkg_tarball=${UNZIP_PKG} ;;
135 * ) pkg_tarball=$(get_package_tarball_name $name) ;;
136 esac
137
138 # Append each name of the script files to a list (this will become
139 # the names of the targets in the Makefile)
140 blfs_tool="$blfs_tool ${this_script}"
141
142 #--------------------------------------------------------------------#
143 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
144 #--------------------------------------------------------------------#
145 #
146 # Drop in the name of the target on a new line, and the previous target
147 # as a dependency. Also call the echo_message function.
[cd4466f]148 if [ "$PROGNAME" = "clfs2" ]; then
149 LUSER_wrt_target "${this_script}" "$PREV"
150 else
151 CHROOT_wrt_target "${this_script}" "$PREV"
152 fi
[fe30c61]153
154 # Insert instructions for unpacking the package and changing directories
155 # DocBook-XML is a zip, the build script will handle that.
[cd4466f]156 if [ "$PROGNAME" = "clfs2" ]; then
157 [[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
158 else
159 [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
160 fi
[fe30c61]161
162 # Run the script.
[cd4466f]163 if [ "$PROGNAME" = "clfs2" ]; then
164 LUSER_wrt_RunAsUser "${file}"
165 else
166 CHROOT_wrt_RunAsRoot "$file"
167 fi
[fe30c61]168
169 # Remove the build directory(ies) except if the package build fails.
[cd4466f]170 if [ "$PROGNAME" = "clfs2" ]; then
171 [[ ! "$name" = "docbook-xml" ]] && LUSER_RemoveBuildDirs "$name"
172 else
173 [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
174 fi
[fe30c61]175
176 # Touch the tracking file.
177 case $name in
178 tidy ) pkg_ver=tidy-051026 ;;
179 unzip ) pkg_ver=unzip-5.52 ;;
180 * ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
181 esac
[cd4466f]182 if [ "$PROGNAME" = "clfs2" ]; then
183 echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
184 else
185 echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
186 fi
[fe30c61]187
188 # Include a touch of the target name so make can check
189 # if it's already been made.
190 wrt_touch
191 #
192 #--------------------------------------------------------------------#
193 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
194 #--------------------------------------------------------------------#
195
196 # Keep the script file name for Makefile dependencies.
197 PREV=${this_script}
198 done
199}
Note: See TracBrowser for help on using the repository browser.