| 1 |
#!/bin/sh |
| 2 |
# application.sh: Special package building rules for atheme-services. |
| 3 |
# |
| 4 |
# Copyright (c) 2007 atheme.org |
| 5 |
# |
| 6 |
# Permission to use, copy, modify, and/or distribute this software for |
| 7 |
# any purpose with or without fee is hereby granted, provided that the above |
| 8 |
# copyright notice and this permission notice appear in all copies. |
| 9 |
# |
| 10 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 11 |
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 12 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 13 |
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
| 14 |
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 15 |
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 16 |
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| 17 |
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 18 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 19 |
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 20 |
# |
| 21 |
|
| 22 |
if [ "x$TIP" = "x" ]; then |
| 23 |
echo "Please don't run me directly." |
| 24 |
exit |
| 25 |
fi |
| 26 |
|
| 27 |
# Services wants the hg tip to be in include/serno.h. |
| 28 |
echo "[atheme-services] Generating include/serno.h for tip $TIP." |
| 29 |
cat << _EOF_ > include/serno.h |
| 30 |
/* Generated automatically by makepackage. Any changes made here will be lost. */ |
| 31 |
#define SERNO "$TIP" |
| 32 |
_EOF_ |