From: Ben Hutchings Date: Tue, 15 Aug 2006 00:04:19 +0000 (+0000) Subject: Made proper use of DESTDIR for installation. X-Git-Tag: 0.9~6 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=5746a18015788678b85907421f91adf249ea71d3;p=videolink.git Made proper use of DESTDIR for installation. Moved stylesheet under /usr/share. Made documentation installation independent of Debian package. Removed bogus distclean target. Enabled and fixed more warnings. --- diff --git a/ChangeLog b/ChangeLog index 064d608..db24331 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +videolink (0.9) unstable; urgency=low + + * Minor build and installation improvements + - Made proper use of DESTDIR for installation + - Moved stylesheet under /usr/share + - Made documentation installation independent of Debian package + - Removed bogus distclean target + - Enabled more warnings + + -- + videolink (0.8) unstable; urgency=low * Updated email and web addresses diff --git a/Makefile b/Makefile index 671ba39..069a59f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ prefix := /usr/local -videolink_lib_dir := $(prefix)/lib/videolink +bindir := $(prefix)/bin +sharedir := $(prefix)/share +docdir := $(sharedir)/doc +mandir := $(sharedir)/man moz_include_dir := \ $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/include/mozilla @@ -14,11 +17,9 @@ moz_version_major := $(word 1,$(subst ., ,$(moz_version))) moz_version_minor := $(word 2,$(subst ., ,$(moz_version))) moz_version_patchlevel := $(word 3,$(subst ., ,$(moz_version))) -CFLAGS := -ansi -Wall +CFLAGS := -ansi -Wall -Wunused -Wno-unused-parameter CPPFLAGS := -D_REENTRANT -# Non-virtual destructors are fine in XPCOM interface classes since -# instances are only ever called by the Release function which is virtual. -CXXFLAGS := -ansi -Wall -Wno-non-virtual-dtor +CXXFLAGS := -ansi -Wall -Wunused LDFLAGS := -lpthread $(shell pkg-config --libs gtkmm-2.0 mozilla-gtkmozembed) \ -Wl,-rpath -Wl,$(moz_lib_dir) -lexpat @@ -44,20 +45,25 @@ clean : rm -rf .objs rm -f videolink *~ .\#* *.orig *.rej svn-commit*.tmp -distclean : clean - rm -rf .svn - install : - mkdir -p -m 755 $(prefix)/bin $(videolink_lib_dir) - install -m 755 -s videolink $(prefix)/bin - install -m 644 videolink.css $(videolink_lib_dir) - -.PHONY : clean distclean install + mkdir -p -m 755 $(DESTDIR)$(bindir) + install -m 755 -s videolink $(DESTDIR)$(bindir) + mkdir -p -m 755 $(DESTDIR)$(docdir)/videolink + gzip -c9 README >$(DESTDIR)$(docdir)/videolink/README.gz + gzip -c9 ChangeLog >$(DESTDIR)$(docdir)/videolink/ChangeLog.gz + chmod 644 $(DESTDIR)$(docdir)/videolink/*.gz + mkdir -p -m 755 $(DESTDIR)$(mandir)/man1 + gzip -c9 videolink.1 >$(DESTDIR)$(mandir)/man1/videolink.1.gz + chmod 644 $(DESTDIR)$(mandir)/man1/videolink.1.gz + mkdir -p -m 755 $(DESTDIR)$(sharedir)/videolink + install -m 644 videolink.css $(DESTDIR)$(sharedir)/videolink + +.PHONY : clean install .objs/browser_widget.% : CPPFLAGS += -DMOZ_LIB_DIR='"$(moz_lib_dir)"' .objs/videolink.% \ - : CPPFLAGS += -DVIDEOLINK_LIB_DIR='"$(videolink_lib_dir)"' \ + : CPPFLAGS += -DVIDEOLINK_SHARE_DIR='"$(sharedir)/videolink"' \ -DMOZ_VERSION_MAJOR=$(moz_version_major) \ -DMOZ_VERSION_MINOR=$(moz_version_minor) \ -DMOZ_VERSION_PATCHLEVEL=$(moz_version_patchlevel) @@ -70,6 +76,12 @@ install : .objs/null_prompt_service.% .objs/style_sheets.% .objs/videolink.% \ .objs/xpcom_support.% \ : CPPFLAGS += $(shell pkg-config --cflags mozilla-gtkmozembed) +# Non-virtual destructors are fine in XPCOM interface classes since +# instances are only ever called by the Release function which is virtual. +.objs/browser_widget.% .objs/child_iterator.% .objs/link_iterator.% \ +.objs/null_prompt_service.% .objs/style_sheets.% .objs/videolink.% \ +.objs/xpcom_support.% \ + : CXXFLAGS += -Wno-non-virtual-dtor # These dig a bit deeper into Mozilla .objs/link_iterator.% .objs/style_sheets.% .objs/videolink.% \ diff --git a/debian/rules b/debian/rules index d3a546c..f5a20be 100755 --- a/debian/rules +++ b/debian/rules @@ -7,18 +7,17 @@ binary : binary-arch binary-indep binary-arch : build dh_testroot - make prefix=debian/videolink/usr install + make DESTDIR=debian/videolink prefix=/usr install dh_strip dh_shlibdeps @echo "Despite the warnings from dh_shlibdeps, this should complete dependencies:" MOZ_VERSION=$$(dpkg-query -W --showformat='$${version}' mozilla-browser | sed 's/+b[0-9]*$$//') \ - && echo "mozilla:Depends=mozilla-browser (>= $$MOZ_VERSION), mozilla-browser (<< $$MOZ_VERSION.0)" >> debian/videolink.substvars + && echo "mozilla:Depends=mozilla-browser (>= $$MOZ_VERSION), mozilla-browser (<= $${MOZ_VERSION}+b99)" >> debian/videolink.substvars mkdir -p -m755 debian/videolink/usr/share/doc/videolink install -m644 debian/copyright debian/videolink/usr/share/doc/videolink/copyright - mkdir -p -m755 debian/videolink/usr/share/man/man1 - install -m644 videolink.1 debian/videolink/usr/share/man/man1/ - dh_installchangelogs ChangeLog - dh_installdocs + mv debian/videolink/usr/share/doc/videolink/ChangeLog.gz \ + debian/videolink/usr/share/doc/videolink/changelog.gz + dh_installchangelogs dh_compress dh_fixperms dh_installdeb diff --git a/debian/videolink.docs b/debian/videolink.docs index e845566..e69de29 100644 --- a/debian/videolink.docs +++ b/debian/videolink.docs @@ -1 +0,0 @@ -README diff --git a/null_prompt_service.cpp b/null_prompt_service.cpp index 03355ac..901c588 100644 --- a/null_prompt_service.cpp +++ b/null_prompt_service.cpp @@ -50,7 +50,7 @@ namespace } } - NS_IMETHODIMP null_prompt_service_factory::LockFactory(PRBool lock) + NS_IMETHODIMP null_prompt_service_factory::LockFactory(PRBool /*lock*/) { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/videolink.cpp b/videolink.cpp index 3d2daeb..030aece 100644 --- a/videolink.cpp +++ b/videolink.cpp @@ -210,7 +210,7 @@ namespace : frame_params_(frame_params), output_dir_(output_dir), encoder_(encoder), - stylesheet_(load_css("file://" VIDEOLINK_LIB_DIR "/videolink.css")), + stylesheet_(load_css("file://" VIDEOLINK_SHARE_DIR "/videolink.css")), pending_window_update_(false), pending_req_count_(0), have_tweaked_page_(false), diff --git a/vob_list.cpp b/vob_list.cpp index f9b304d..c907422 100644 --- a/vob_list.cpp +++ b/vob_list.cpp @@ -120,7 +120,7 @@ namespace } void end_element_handler(void * user_data, - const char * name) + const char * /*name*/) { parse_context & context = *static_cast(user_data); --context.level;