On Sat, November 22, 2008 12:26 pm, Ralf Wildenhues wrote: > Hello Andrew, > > * Andrew M. wrote on Sat, Nov 22, 2008 at 12:26:07AM CET: >> * There is only one source file (myapplet.c) in /src >> * I have two folders, /pixmaps e /conf, that contain some graphics for >> the >> applet and the initial configuration file > >> * In the folder root I also have the .server file needed by Bonobo >> >> and this is what I want to accomplish: >> >> * The compiled binary has to end up in /usr/lib/gnome-applets/ >> * The graphics (icons and a logo) have to be copied in >> /usr/share/pixmaps/myapplet >> * The configuration file has to be copied in ~/.myapplet/myapplet.conf * >> The .server file has to be copied in in /usr/lib/bonobo/servers/ >> >> The configure script should also check for dependencies such as gtk+, >> glibc and libxml2. > > typical recursive makefile setup: > > --- Makefile.am --- > SUBDIRS = src pixmaps conf > bonoboserverdir = $(libdir)/bonobo/servers > dist_bonoboserver_DATA = .server > > --- src/Makefile.am --- > mylibexec_PROGRAMS = myapplet > myapplet_SOURCES = myapplet.c > mylibexecdir = $(libdir)/gnome-applets > > --- pixmaps/Makefile.am --- > pkgdata_DATA = pixmap1 pixmap2 ... > > --- conf/Makefile.am --- > # This a bit of a problem. You should not arbitrarily install > # files outside of $(prefix), that brings a lot of problems with > # it. Thus, install the conf file in an easily findable place > # ($prefix/etc/myapplet) and let your applet (or the install code) > # recommend to your users to put it in ~/.myapplet. > > pkgsysconfdir = $(sysconfdir)/myapplet > dist_pkgsysconf_DATA = myapplet.conf > > --- configure.ac > AC_INIT([myapplet], [1.0], [bugreport-address]) > AM_INIT_AUTOMAKE([foreign]) > AC_PROG_CC > AC_CONFIG_FILES([Makefile.am src/Makefile.am pixmaps/Makefile.am > conf/Makefile.am]) > AC_OUTPUT > --- > > Then run > autoreconf -vif > > I'm sure there is lots of stuff still missing, like needed libraries and > header checks and whatnot. But this should get you started. > > Cheers, > Ralf
Thanks! I'll get right on to it Andrew