]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | # application.sh: Special package building rules for solanum. | |
3 | # | |
4 | # Copyright (c) 2007-2008 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 | # Solanum wants the git head to be in include/serno.h, in its own format. | |
28 | SERNO=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h` | |
29 | DATECODE=`git log -1 --pretty=format:%ct` | |
30 | ||
31 | echo "[solanum] Generating include/serno.h for tip $MYTIP." | |
32 | cat << _EOF_ > include/serno.h | |
33 | /* Generated automatically by makepackage. Any changes made here will be lost. */ | |
34 | #define SERNO "$SERNO" | |
35 | #define DATECODE ${DATECODE}UL | |
36 | _EOF_ |