4 echo "Deb related option disabled."
5 echo "Use deb-creator.sh to make .deb packages."
6 echo "Some scripts still use this script to do cleaning, so don't delete yet."
18 if [[ "$COMMAND" == "" ]]; then
20 echo "Error: You did not give me a command to run!"
27 # --release|release|rel) make_deb_release "${ARGS[@]:2}";;
28 # --debug|debug|bug) make_deb_debug "${ARGS[@]:2}";;
29 # --developer|developer|dev) make_deb_dev "${ARGS[@]:2}";;
30 --clean|clean
) make_deb_clean
"${ARGS[@]:2}";;
31 *) echo "Error: Unknown command \"$COMMAND\"";
39 echo "Usage: $SCRIPT_NAME COMMAND"
42 # echo " --release | release | rel"
43 # echo " Create a release package of irreco."
44 # echo " --debug | debug | bug"
45 # echo " Create a debug package of irreco."
46 # echo " --developer | developer | dev"
47 # echo " Create a package for backend developers. This will"
48 # echo " install irreco and irreco-util pkg-config files, and"
49 # echo " irreco-api and irreco-util headers."
50 echo " --clean | clean"
51 echo " Delete few files."
53 # echo "IRRECO_BACKENDS variable:"
54 # echo " IRRECO_BACKENDS variable can be used to select which backends"
55 # echo " will be compilend into the deb. For example: "
57 # echo " IRRECO_BACKENDS=\"dummy lirc\" ./make-deb.sh --debug"
59 # echo " would make a debug package with only dummy and lirc backends."
66 make_deb_print_title
"RELEASE"
68 REGEX
='AC_INIT\(\[irreco\], \[(.*)\]\)'
69 VERSION_CONFIGURE
=$
(egrep -o '^'"$REGEX"'$' .
/irreco
/configure.ac |
sed -r "s|$REGEX|\1|")
71 if [[ "$VERSION_CONFIGURE" == "" ]]; then
72 echo "Could not get version number."
76 head .
/ChangeLog
-n 1 |
grep "$VERSION_CONFIGURE" > /dev
/null
77 check_exit_code
"$?" "Version numbers dont match in ./ChangeLog and ./irreco/configure.ac"
79 head .
/debian
/changelog
-n 1 |
grep "$VERSION_CONFIGURE" > /dev
/null
80 check_exit_code
"$?" "Version numbers dont match in ./debian/changelog and ./irreco/configure.ac"
82 head .
/debian
/changelog
-n 1 |
egrep '\([0-9.]+-[0-9]+\)' > /dev
/null
83 check_exit_code
"$?" "Version number in ./debian/changelog must be in"\
84 "the form (__SRC_VERSION__-__DEB_VERSION__). For example (0.5.6-1)."
86 make_deb
"irtrans lirc mythtv"
92 make_deb_print_title
"DEBUG"
93 export IRRECO_DEBUG
=yes
94 make_deb
"dummy irtrans lirc mythtv"
100 make_deb_print_title
"DEV"
101 export IRRECO_DEBUG
=yes
102 export IRRECO_DEVELOPER
=yes
107 # Make debian package.
111 "$SCRIPT_DIR"/irtrans.sh
make
114 if [[ "$IRRECO_BACKENDS" == "" ]]; then
115 export IRRECO_BACKENDS
="$1"
117 echo "IRRECO_BACKENDS=$IRRECO_BACKENDS";
120 export IRTRANS_LIB_DIR
="$IRTRANS_SHLIB_DIR"
121 save_exit_code dpkg-buildpackage
-rfakeroot -B 2>&1 \
122 |
tee "$DEB_LOG_FILE"
126 if [[ "$EXIT_CODE" != "0" ]]; then
127 make_deb_print_title
"WARNINGS & ERRORS"
128 check_log
"$DEB_LOG_FILE" "0"
135 rm -f "$SCRIPT_TMP_DIR/irreco_sb_target"
136 make_deb_print_title
"CLEAN"
137 "$SCRIPT_DIR"/irreco.sh clean
139 "$SCRIPT_DIR"/backend.sh all clean
142 rm -fv .
/configure-stamp
144 rm -rfv .
/debian
/irreco
147 make_deb_print_title
()
149 print_title
"MAKE DEB $1"