Newbie question 4

Jaromír Mikeš mira.mikes at seznam.cz
Mon Mar 9 17:12:37 UTC 2009


Hello,

I continue working on my two packages jkmeter-0.4.0 and clxclient-3.6.1 which is actually library, but the first program is dependent on it so I should probably to make a package of it first. I am aware that build libraries is not recommended for beginners but it seems to be only way.
I am now trying figure out how to modify makefile  .... names of variables are different in my makefile than variables in "New Maintainer's Guide" http://www.debian.org/doc/maint-guide/ch-modify.en.html
I am not sure if I have to change them or changing /usr/local to /usr is enough in my case.
Any advice appreciated.

mira

PREFIX = /usr/local
SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
LIBDIR = lib$(SUFFIX)


MAJVERS = 3
MINVERS = 6.1
VERSION = $(MAJVERS).$(MINVERS)
DISTDIR = clxclient-$(VERSION)


CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2 
LDFLAGS += -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR) `freetype-config --libs`
LDLIBS +=


CLXCLIENT_SO = libclxclient.so
CLXCLIENT_MAJ = $(CLXCLIENT_SO).$(MAJVERS)
CLXCLIENT_MIN = $(CLXCLIENT_MAJ).$(MINVERS)
CLXCLIENT_DEP = -lpthread -lXft -lX11
CLXCLIENT_O = xdisplay.o xresman.o xhandler.o xwindow.o xdraw.o \
	button.o textip.o enumip.o menuwin.o scale.o slider.o scroll.o mclist.o meter.o
CLXCLIENT_H = clxclient.h


$(CLXCLIENT_MIN): $(CLXCLIENT_O)
	g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)


install:	$(CLXCLIENT_MIN)
	/usr/bin/install -d $(PREFIX)/$(LIBDIR)
	/usr/bin/install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
	/usr/bin/install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
	/sbin/ldconfig -n $(PREFIX)/$(LIBDIR)
	ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)


clean:
	/bin/rm -f *~ *.o *.a *.d *.so.*


tarball:
	cd ..; \
	/bin/rm -f -r $(DISTDIR)*; \
	svn export clxclient $(DISTDIR); \
	tar cvf $(DISTDIR).tar $(DISTDIR); \
	bzip2 $(DISTDIR).tar; \
	/bin/rm -f -r $(DISTDIR);
 



More information about the pkg-multimedia-maintainers mailing list