summaryrefslogtreecommitdiffstats
path: root/ubuntu/_base/applications/amarok/debian/rules
blob: b8d2b74d1a554efa8135e594bbdcff10e7852635 (plain)
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
#!/usr/bin/make -f

### CDBS INCLUDES
include /usr/share/cdbs/1/rules/debhelper.mk
include debian/cdbs/debian-qt-kde.mk
#include /usr/share/cdbs/1/rules/patchsys-quilt.mk

DEB_CONFIGURE_INCLUDEDIR := /opt/trinity/include/tde
DEB_CONFIGURE_MANDIR := /opt/trinity/share/man
DEB_CONFIGURE_PREFIX := /opt/trinity
DEB_CONFIGURE_INFODIR := /opt/trinity/share/info

cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)

DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
                               && echo xz || echo bzip2)

### VARIABLES
# Exempt amarok engines from being handled as proper public libraries
# by dh_makeshlibs
DEB_DH_MAKESHLIBS_ARGS_ALL = -Xlibamarok_\\w*-engine-trinity

export KUBUNTU_DESKTOP_POT=extragear-multimedia_amarok-trinity

DEB_CONFIGURE_EXTRA_FLAGS  :=	--without-included-sqlite \
				--disable-final \
				--without-akode \
				--without-gstreamer10 \
				--without-libkarma \
				--with-ifp      \
				--with-libgpod  \
				--with-libnjb   \
				--with-libmtp   \
				--with-mp4v2    \
				--enable-mysql  \
				--enable-postgresql \
				--with-yauap \
				--prefix=/opt/trinity \
				--with-extra-libs=/usr/lib/mesa

# Ship upstream README in amarok docs
DEB_INSTALL_DOCS_ALL =
DEB_INSTALL_DOCS_amarok-trinity = $(DEB_SRCDIR)/README

# Amarok engines should not auto-depend on amarok. 
# Appropriate relationships are set manually in the control file.
DEB_DH_SHLIBDEPS_ARGS_amarok-engine-xine-trinity = -- -xamarok-trinity
DEB_DH_SHLIBDEPS_ARGS_amarok-engine-yauap-trinity = -- -xamarok-trinity

### Libtool and Automake updates
# Autoguess automake /usr/share subdirectory. Insure from failures
DEB_AUTOMAKE_SHARE_DIR = /usr/share/automake-$(shell automake --version | head -n 1 | sed 's/^automake (GNU automake) \([0-9]\+\.[0-9]\+\).*/\1/')
ifneq ($(words $(DEB_AUTOMAKE_SHARE_DIR)),1)
DEB_AUTOMAKE_SHARE_DIR =
endif

post-patches:: debian/stamp-automake
debian/stamp-automake:
	touch debian/stamp-automake-started
	if test -n "$(DEB_AUTOMAKE_SHARE_DIR)"; then \
		for f in $(DEB_AUTOMAKE_SHARE_DIR)/*; do \
			if  test -f $$f && \
			test -f $(DEB_SRCDIR)/admin/`basename $$f`; then \
			cp -f $$f $(DEB_SRCDIR)/admin; \
			fi; \
		done; \
	fi
	$(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common
	touch $@

# Install ${curpkg}.install as lintian overrides
$(patsubst %,binary-install/%,$(DEB_PACKAGES))::
	if test -e debian/$(cdbs_curpkg).lintian; then \
		install -p -D -m644 debian/$(cdbs_curpkg).lintian \
		    debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
	fi

clean::
	if test -d $(DEB_SRCDIR) && test -f debian/stamp-automake-started; then \
		cd $(DEB_SRCDIR); \
		find . -name Makefile.in -print | \
				xargs --no-run-if-empty rm -f; \
		rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
				configure configure.files configure.in stamp-h.in \
				subdirs; \
	fi
	rm -f debian/stamp-automake*

binary-fixup/amarok-common-trinity::
	# Fix permissions of some amarok scripts
	chmod a+x  \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/lyrics_astraweb/lyrics_astraweb.rb \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/playlist2html/Playlist.py \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/ruby_debug/debug.rb \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/templates/python_qt_template.py \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/templates/ruby_qt_template.rb \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/webcontrol/Playlist.py \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/webcontrol/RequestHandler.py

binary-post-install/amarok-common-trinity::
	# Remove excess COPYING files from script directories
	rm -f \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/lyrics_astraweb/COPYING \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/lyrics_lyrc/COPYING \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/score_default/COPYING \
	    debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/scripts/score_impulsive/COPYING
	# Remove Mac OSX resource fork file
	rm -f debian/$(cdbs_curpkg)/opt/trinity/share/apps/amarok/ruby_lib/rubygems/._gem_commands.rb

### POST-INSTALL HACKING
common-binary-post-install-arch::
	# Check for not installed files
	dh_install --no-act --list-missing

	chmod a+x debian/amarok-trinity/opt/trinity/lib/amarok/install-mp3
	chmod +x debian/amarok-trinity/opt/trinity/bin/kubuntu-media-amarok
	ln -s /opt/trinity/bin/amarokapp debian/amarok-trinity/opt/trinity/lib/amarok/amarokapp