3 # Prepare a Notion release.
5 # Run this script in a freshly checked out notion directory: never commit the
6 # changes made by this script (but perhaps tag them).
10 # ~/dev/releases/notion$ ./predist.sh -snapshot
12 # ~/dev/releases/notion-3-20110219$ ./predist.sh
14 if test "$NOTION_REPOS" = ""; then
15 NOTION_REPOS
=git
://notion.git.sourceforge.net
/gitroot
/notion
24 ! test -f "${project}" || { echo "${project} exists"; exit 1; }
26 git clone "${url}" "${project}"
27 cd "${project}" ; git log > exact-version ; cd ..
28 rm -rf "${project}/.git
"
38 if test "$1" != "-snapshot"; then
39 release=`echo "$dir"|sed 's/^[^-]\+-\([^-]\+-[0-9]\+\(-[0-9]\+\)\?\)$/\1/p; d'`
41 if test "$release" = ""; then
42 echo "Invalid package name
$dir. Use the
'-snapshot' option to create a snapshot package
"
45 versdef="#define NOTION_RELEASE \"${release}\""
46 perl
-p -i -e "s/^#define NOTION_RELEASE.*/$versdef/" version.h
47 #perl -p -i -e "s/NOTION_RELEASE/$release/" build/ac/configure.ac
50 release
=snapshot-
`date +"%Y%m%d"`
51 cd ..
; mv $dir "$dir-$release" ; cd "$dir-$release"
62 rm $2/build
/rules.mk
$2/system.mk
63 #ln -s ../../build/rules.mk $2/build/rules.mk
64 cat > $2/build
/system-inc.mk
<< EOF
65 TOPDIR := \$(TOPDIR)/..
66 include \$(TOPDIR)/build/system-inc.mk
77 sed -i -e "s/TOPDIR=..\/notion/TOPDIR=..\//" $2/Makefile
80 getlib
$NOTION_REPOS/libtu libtu
81 getlib
$NOTION_REPOS/libextl libextl
82 getmod
$NOTION_REPOS/mod_xinerama mod_xinerama
83 getmod
$NOTION_REPOS/mod_xrandr mod_xrandr
84 getmod
$NOTION_REPOS/mod_xkbevents mod_xkbevents
85 do_git_export
$NOTION_REPOS/contrib contrib
92 perl
-n -i -e 'if(s/^#DIST: (.*)/$1/){ print; <>; } else { print; }' "$@"
95 mkdist Makefile system.mk
96 sed -i -e "s/de/de mod_xinerama mod_xrandr mod_xkbevents/" modulelist.mk
98 ifeq (\$(PRELOAD_MODULES),1)
99 X11_LIBS += -lXinerama -lXrandr
111 echo Creating notion-
${release}.
tar.gz
112 tar --exclude-vcs -czf notion-
${release}-src.
tar.gz
$dir
113 echo Creating notion-
${release}.
tar.bz2
114 tar --exclude-vcs -cjf notion-
${release}-src.
tar.bz2
$dir