Maemo Nokia 770 and 800 debian packaging.

Fixed the "Home" button missing icon problem
Fixed cursor (now it's hidden)
Files are saved on /media/mmc1/tuxpaint by default so users can see them
from the filemanager
Added xpm icon to hildon desktop
This commit is contained in:
Alessandro Pasotti 2007-03-24 09:00:28 +00:00
parent 52a8db16ac
commit cb9a159ba5
8 changed files with 511 additions and 56 deletions

View file

@ -243,7 +243,9 @@ nokia770:
make \
DATA_PREFIX=/usr/share/tuxpaint \
SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG \
MAEMOFLAG=NOKIA_770
MAEMOFLAG=NOKIA_770 \
LOCALE_PREFIX=$(PREFIX)/share/locale \
CONFDIR=/etc/tuxpaint
# "make install" installs all of the various parts
@ -548,12 +550,22 @@ install-nokia770:
@echo "...Installing launcher icon into the Nokia 770..."
@if [ "x$(NOKIA770_PREFIX)" != "x" ]; then \
install -d $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps; \
cp data/images/icon.png $(PKG_ROOT)/$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
cp data/images/icon.png $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
cp hildon/tuxpaint.xpm $(PKG_ROOT)/$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.xpm; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.xpm; \
install -d $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon; \
cp hildon/tuxpaint.desktop $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon/; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon/tuxpaint.desktop; \
install -d $(PKG_ROOT)/etc/tuxpaint; \
cp hildon/tuxpaint.conf $(PKG_ROOT)/etc/tuxpaint; \
chmod 644 $(PKG_ROOT)/etc/tuxpaint/tuxpaint.conf; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/X11R6; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/share/doc; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/share/man; \
fi
@-find $(PKG_ROOT)$(NOKIA770_PREFIX) -name CVS -type d -exec rm -rf \{\} \;
# Install a launcher icon in the KDE menu...

28
debian/control vendored Normal file
View file

@ -0,0 +1,28 @@
Source: tuxpaint
Version: 0.9.17
Section: user/games
Priority: optional
Installed-Size: 2828
Maintainer: Alessandro Pasotti <apasotti@gmail.com>
Package: tuxpaint
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A paint program for young children
Tux Paint is meant to be a simple drawing program for young
children. It is not meant as a general-purpose drawing tool.
It IS meant to be fun and easy to use. Sound effects and a
cartoon character help let the user know what's going on, and
keeps them entertained.
.
Tux Paint is extensible. Brushes and "rubber stamp" shapes can be
dropped in and pulled out. For example, a teacher can drop in a
collection of animal shapes and ask their students to draw an
ecosystem. Each shape can have a sound which is played, and
textual facts which are displayed, when the child selects the shape.
.
There is no direct access to the computer's underlying intricacies.
The current image is kept when the program quits, and reappears when
it is restarted. Saving images requires no need to create filenames
or use the keyboard. Opening an image is done by selecting it from
a collection of thumbnails.

16
debian/postinst vendored Executable file
View file

@ -0,0 +1,16 @@
#! /bin/sh
# The clock might be wrong and we know that we need to update the icon
# cache so we just force it.
gtk-update-icon-cache -f /usr/share/icons/hicolor
if [ ! -d /media/mmc1/tuxpaint ]
then
mkdir /media/mmc1/tuxpaint
fi
echo " Lets ask about the location"
maemo-select-menu-location tuxpaint.desktop tana_fi_games
exit 0

100
debian/rules vendored Executable file
View file

@ -0,0 +1,100 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Builds tuxpaint for MAEMO NOKIA DEVICES
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE) nokia770 PKG_ROOT=$(CURDIR)/debian/tuxpaint PREFIX=/usr
#docbook-to-man debian/tuxpaint.sgml > tuxpaint.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tuxpaint.
$(MAKE) install PKG_ROOT=$(CURDIR)/debian/tuxpaint PREFIX=/usr
$(MAKE) install-nokia770 PKG_ROOT=$(CURDIR)/debian/tuxpaint NOKIA770_PREFIX=/usr
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installchangelogs
# dh_installdocs
# dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

231
hildon/tuxpaint.conf Normal file
View file

@ -0,0 +1,231 @@
# /etc/tuxpaint/tuxpaint.conf
#
# Configuration file for Tux Paint
# See tuxpaint(1) or run 'tuxpaint --help' for details on using Tux Paint
#
# Bill Kendrick <bill@newbreedsoftware.com>
# Default distribution version last modified:
# October 24, 2004
# The variables described below are initially commented out.
#
# Most options come in pairs:
#
# The top examples change the default behavior
# (e.g., "fullscreen=yes" enables full-screen mode, while
# the default mode is windowed, not fullscreen.)
#
# The bottom examples reenable the default behavior
# (e.g., "windowed=yes" enables fullscreen mode.)
#
# In the system-wide Tux Paint configuration file
# (e.g. "/etc/tuxpaint/tuxpaint.conf"
# or "/usr/local/etc/tuxpaint/tuxpaint.conf")
# the default options are redundant.
#
# They are, however, useful to place in a user's personal confiugration file
# ("~/.tuxpaintrc"), to override any settings they don't like in the
# system-wide configuration file, and which they don't want to always have
# to override via command-line options.
#
# For more information, see Tux Paint's main documentation file: README.txt
### Fullscreen or Windowed?
### -----------------------
#
fullscreen=yes
# windowed=yes
### Window size / screen resolution. (640x480 is the default.)
### -----------------------------------------------------------
#
# windowsize=1600x1200
# windowsize=1400x1050
# windowsize=1280x1024
# windowsize=1024x768
# windowsize=800x600
# windowsize=640x480
windowsize=800x480
### Disable sound effects?
### ----------------------
#
# nosound=yes
# sound=yes
### Disable the on-screen 'Quit' button in the toolbar?
### ---------------------------------------------------
### Note: Pressing the [Escape] key,
### or clicking the window's 'Close' button will still work
#
# noquit=yes
# quit=yes
### Disable the printing feature?
### -----------------------------
#
noprint=yes
# print=yes
### Restrict printing?
### ------------------
### For example, if 'printdelay=60',
### the user can only print once per minute (60 seconds)
#
# printdelay={SECONDS}
# printdelay=0
### Use stored printer configuration?
### ---------------------------------
#
# printcfg=yes
# printcfg=no
### Use a different print command?
### ------------------------------
### Note: The command should expect a PNG file on its STDIN (standard-in)
###
### For example, to convert the image to greyscale before converting
### to PostScript, use "pngtopnm | ppmtopgm | pnmtops | lpr" as the command
#
# printcommand={COMMAND}
# printcommand=pngtopnm | pnmtops | lpr
### Use the simpler shape tool? (No rotating)
### -----------------------------------------
#
# simpleshapes=yes
# complexshapes=yes
### Display only uppercase letters?
### -------------------------------
#
# uppercase=yes
# mixedcase=yes
### Grab the mouse and keyboard?
### ----------------------------
#
# grab=yes
# dontgrab=yes
### Disable [Control] key shortcuts?
### --------------------------------
#
# noshortcuts=yes
# shortcuts=yes
### Disable wheel mouse support?
### ----------------------------
#
# nowheelmouse=yes
# wheelmouse=yes
### Don't use special mouse pointer (cursor) shapes?
### ------------------------------------------------
#
nofancycursors=yes
# fancycursors=yes
### Use the keyboard to control the mouse pointer (cursor)?
### -------------------------------------------------------
#
# keyboard=yes
# mouse=yes
### Use less graphics-intensive outlines?
### -------------------------------------
#
nooutlines=yes
# outlines=yes
### Disable the Stamp tool?
### -----------------------
#
# nostamps=yes
# stamps=yes
### Disable Stamp controls (flip, mirror, size)?
### --------------------------------------------
#
# nostampcontrols=yes
# stampcontrols=yes
### Show mirrored stamps by default? (e.g., for those prefering right-to-left)
### --------------------------------------------------------------------------
#
# mirrorstamps=yes
# dontmirrorstamps=yes
### Use keyboard arrow keys to control mouse pointer?
### -------------------------------------------------
#
# keyboard=yes
# mouse=yes
### Disable 'Save Over Older Picture?' Prompt
### Always save over, instead
### -----------------------------------------
#
# saveover=yes
# saveover=ask
### Save images somewhere different?
### --------------------------------
### Note: Window users, use the form: savedir=C:\WINDOWS\TUXPAINT
#
# savedir=~/.tuxpaint/saved
savedir=/media/mmc1/tuxpaint
### Disable 'Save Over Older Picture?' Prompt
### Always make a new picture, instead
### -----------------------------------------
#
# saveover=new
# saveover=ask
### Disable the 'Save' feature altogether?
### --------------------------------------
#
# nosave=yes
# save=yes
### Use a different language?
### -------------------------
### Note: Where the language is a known language name (e.g., "spanish")
###
### For a full list, see tuxpaint(1) man page, README.txt documentation,
### or language usage output (by running the command "tuxpaint --lang help")
#
# lang={LANGUAGE}
# lang=english
# (End of configuration file)

View file

@ -2,8 +2,13 @@
Encoding=UTF-8
Name=Tux Paint
Type=Application
Exec=/var/lib/install/usr/bin/tuxpaint
Exec=/usr/bin/tuxpaint
Icon=tuxpaint
Terminal=false
GenericName=Drawing program
Comment=A drawing program for children.
StartupWMClass=TuxPaint.TuxPaint
X-Icon-path=/usr/share/pixmaps/
X-Window-Icon=tuxpaint
X-Window-Icon-Dimmed=tuxpaint
X-HildonDesk-ShowInToolbar=true

49
hildon/tuxpaint.xpm Normal file
View file

@ -0,0 +1,49 @@
/* XPM */
static char * icon32x32_xpm[] = {
"32 32 14 1",
" c None",
". c #000000",
"+ c #FFFF00",
"@ c #191919",
"# c #7F7F00",
"$ c #333333",
"% c #666667",
"& c #4C4C4C",
"* c #B2B2B2",
"= c #FFFFFF",
"- c #CCCCCC",
"; c #E5E5E5",
"> c #999999",
", c #7F7F7F",
"..... ..... ... ... ",
".+++. .+++.. .+@ .+. ",
"..#.....@..@..#.##.......@..#.. ",
" .#@#.#.##.##.#@##.##@#@##..##. ",
" .+.+.+..+++..+.+@+@+@+@+.+.+.. ",
" .+.+.+..+++.@++@++.+.+.+@+.+.. ",
" .#@#@#@##@##.#..##.#.#.#.#@##..",
" .+..++.++@++.+...+++@+@+.+@@++.",
" ............... .......@@......",
" @@.......@@ ",
" @$%$..@@...@ ",
" &*=*@%-*@..@ ",
"$@@@@@@@ %;--%;==%..@ ",
"@....@@@@ >*&*>;==%..@@ ",
"......... @-;-**$-;$...@ ",
"........@@ @$#&%>%;>;-@...@ ",
".........@@ ##+#++##,--&....@ ",
"..........@@ #++++++++&$@....@@",
"@..........@@@####+++++#@.....@@",
" @@.........@@+#$+++++++#......@",
" @@@........@#+++++++++#......@",
" @@@......@@#++++++++@......@",
" @@.......@##+++++#.......@",
" $@........@####$@.......@",
" @@.......@@@@...........",
" @@.....$>-*>$..........",
" @@..@-====;$...@.....",
" @@..%======*@.$>.....",
" @@..*======;$.$-@....",
" @@..$-======;&..*%....",
" @@..@-========%..$*@...",
" @@.@>=========>...%%..."};

View file

@ -1366,6 +1366,8 @@ static void eat_sdl_events(void)
int main(int argc, char *argv[])
{
CLOCK_TYPE time1;
CLOCK_TYPE time2;
SDL_Rect dest;
@ -1500,7 +1502,6 @@ int main(int argc, char *argv[])
/* Main loop! */
mainloop();
/* Close and quit! */
save_current();
@ -5855,6 +5856,7 @@ static int load_user_fonts_stub(void *vp)
static void setup(int argc, char *argv[])
{
int i, j, ok_to_use_sysconfig;
char str[128];
char *upstr;
@ -5945,6 +5947,11 @@ static void setup(int argc, char *argv[])
mirrorstamps = 0;
disable_stamp_controls = 0;
#ifndef WINDOW_WIDTH
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 600;
#endif
#ifdef NOKIA_770
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 480;
@ -5955,11 +5962,6 @@ static void setup(int argc, char *argv[])
WINDOW_WIDTH = 1200;
WINDOW_HEIGHT = 900;
#endif
#ifndef WINDOW_WIDTH
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 600;
#endif
playfile = NULL;
recording = 0;
playing = 0;
@ -6556,6 +6558,7 @@ static void setup(int argc, char *argv[])
}
}
#ifndef NOSOUND
#ifndef WIN32
if (use_sound && Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 1024) < 0)
@ -6748,6 +6751,10 @@ static void setup(int argc, char *argv[])
#endif
SDL_WM_SetCaption("Tux Paint", "Tux Paint");
#ifdef NOKIA_770
SDL_ShowCursor (SDL_DISABLE);
#endif
/* Open Window: */
if (fullscreen)
@ -6845,8 +6852,14 @@ static void setup(int argc, char *argv[])
exit(1);
}
#ifdef NOKIA_770
snprintf(tmp_str, sizeof(tmp_str), "Version: %s %s - Maemo", VER_VERSION,
VER_DATE);
#else
snprintf(tmp_str, sizeof(tmp_str), "Version: %s %s", VER_VERSION,
VER_DATE);
#endif
tmp_surf = render_text(medium_font, tmp_str, black);
dest.x = 10;
dest.y = WINDOW_HEIGHT - img_progress->h - tmp_surf->h;
@ -6857,7 +6870,7 @@ static void setup(int argc, char *argv[])
printf("%s\n", tmp_str);
#endif
snprintf(tmp_str, sizeof(tmp_str), "© 20022006 Bill Kendrick et al.");
snprintf(tmp_str, sizeof(tmp_str), "© 2002~@~S2006 Bill Kendrick et al.");
tmp_surf = render_text(medium_font, tmp_str, black);
dest.x = 10;
dest.y = WINDOW_HEIGHT - img_progress->h - (tmp_surf->h * 2);
@ -11299,11 +11312,13 @@ static void cleanup(void)
free(lock_fname);
}
/* Close up! */
TTF_Quit();
SDL_Quit();
}
@ -15982,4 +15997,3 @@ float pick_best_scape(unsigned int orig_w, unsigned int orig_h,
}
#endif