1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
#!/usr/bin/make -f
#-*- makefile -*-
#export DH_VERBOSE=1
export DH_OPTIONS
# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
# how to call make, similar to CDBS
DEB_MAKE_ENVVARS += GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) $(MAKE)
p_dir = $(CURDIR)/debian
p_xine = totem-xine
p_gstreamer = totem-gstreamer
build_xine = debian/totem-xine
build_gstreamer = debian/totem-gstreamer
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
COMMON_CONFIGURE_FLAGS := --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man --libexecdir=\$${prefix}/lib/totem --disable-maintainer-mode --enable-mozilla --with-browser-plugins=xulrunner
build :
build-xine: build-xine-stamp
build-xine-stamp: patch
dh_testdir
if test -f build-gstreamer-stamp; then \
$(DEB_MAKE_INVOKE) distclean; \
rm -f build-gstreamer-stamp; \
fi
./configure $(COMMON_CONFIGURE_FLAGS)
$(DEB_MAKE_INVOKE)
touch build-xine-stamp
build-gstreamer: build-gstreamer-stamp
build-gstreamer-stamp: patch
dh_testdir
if test -f build-xine-stamp; then \
$(DEB_MAKE_INVOKE) distclean; \
rm -f build-xine-stamp; \
fi
./configure $(COMMON_CONFIGURE_FLAGS) --enable-gstreamer
$(DEB_MAKE_INVOKE)
touch build-gstreamer-stamp
clean:: unpatch
dh_testdir
dh_testroot
-$(DEB_MAKE_INVOKE) distclean
-rm -f $(stamps_to_clean)
-rm -f $(files_to_clean)
-rm -rf $(dirs_to_clean)
-test -r /usr/share/misc/config.sub && test -r config.sub && \
cp -f /usr/share/misc/config.sub config.sub
-test -r /usr/share/misc/config.guess && test -r config.guess && \
cp -f /usr/share/misc/config.guess config.guess
dh_clean
install:
dh_testdir
dh_testroot
dh_clean -k
$(DEB_MAKE_INVOKE) -f debian/rules install-xine
$(DEB_MAKE_INVOKE) -f debian/rules install-gstreamer
cd po; intltool-update -p
install-xine: DH_OPTIONS=-p$(p_xine)
install-xine: build-xine
$(DEB_MAKE_INVOKE) install DESTDIR=$(CURDIR)/$(build_xine)
# install the plugin in /usr/lib/totem
mkdir -p $(build_xine)/usr/lib/totem
mv $(build_xine)/usr/lib/mozilla/plugins/*.so $(build_xine)/usr/lib/totem/
# the .xpt files are recommended for the javascript interface
mv $(build_xine)/usr/lib/mozilla/plugins/*.xpt $(build_xine)/usr/lib/totem/
# drop anything else
rm -rf $(build_xine)/usr/lib/xulrunner
# drop *.a and *.la files
find debian/totem-xine -name '*.a' -not -regex 'debian/totem-xine/usr/lib/[^/]*' -exec rm {} \;
find debian/totem-xine -name '*.la' -exec rm {} \;
dh_install
# libtotem-plparser package
mkdir -p debian/libtotem-plparser1/usr/lib
mv debian/totem-xine/usr/lib/libtotem-plparser.so.* debian/libtotem-plparser1/usr/lib
mkdir -p debian/libtotem-plparser-dev/usr/lib
mv debian/totem-xine/usr/include debian/libtotem-plparser-dev/usr
mv debian/totem-xine/usr/lib/pkgconfig debian/libtotem-plparser-dev/usr/lib/
mv debian/totem-xine/usr/lib/libtotem-plparser.a debian/libtotem-plparser-dev/usr/lib
mv debian/totem-xine/usr/lib/libtotem-plparser.so debian/libtotem-plparser-dev/usr/lib
install-gstreamer: DH_OPTIONS=-p$(p_gstreamer)
install-gstreamer: build-gstreamer
$(DEB_MAKE_INVOKE) install DESTDIR=$(CURDIR)/$(build_gstreamer)
# install the plugin in /usr/lib/totem
mkdir -p $(build_gstreamer)/usr/lib/totem
mv $(build_gstreamer)/usr/lib/mozilla/plugins/*.so $(build_gstreamer)/usr/lib/totem/
# the .xpt files are recommended for the javascript interface
mv $(build_gstreamer)/usr/lib/mozilla/plugins/*.xpt $(build_gstreamer)/usr/lib/totem/
# drop anything else
rm -rf $(build_gstreamer)/usr/lib/xulrunner
dh_install
# drop *.a and *.la files
find debian/totem-gstreamer -name '*.a' -exec rm {} \;
find debian/totem-gstreamer -name '*.la' -exec rm {} \;
rm -f debian/totem-gstreamer/usr/lib/libtotem-plparser.so*
rm -rf debian/totem-gstreamer/usr/include/ debian/totem-gstreamer/usr/lib/pkgconfig/
# Build architecture-independent files here.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs -A NEWS README
dh_installchangelogs ChangeLog
dh_scrollkeeper
dh_compress
dh_link
dh_fixperms
dh_strip
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs -A NEWS README
dh_installmenu
dh_installman
dh_installchangelogs ChangeLog
dh_gconf
dh_desktop
dh_compress
dh_link
dh_fixperms
dh_makeshlibs -V 'libtotem-plparser1 (>= 2.16.1)'
dh_strip --dbg-package=libtotem-plparser1
dh_perl
dh_installdeb
dh_shlibdeps -L libtotem-plparser1 -l debian/libtotem-plparser1/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|