* ./mozilla/*: preliminary Mozilla plugin. Only works under Unix for now.
[vlc.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for the VideoLAN Client - uses debhelper.
3 # based on Joey Hess's one.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatability version to use.
9 export DH_COMPAT=3
10
11 # Compilation options
12 export CONFIG_FLAGS="--enable-release --prefix=/usr --enable-gnome --enable-gtk --enable-fb --enable-ggi --enable-sdl --enable-esd --enable-qt --enable-mad --enable-arts --enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi --enable-xosd --enable-mozilla --enable-kde"
13 # Remove --without-dvdcss here in non-totalitarian countries
14 export DVDCSS_FLAGS="--enable-dvd --without-dvdcss"
15
16 export VIDDIR="usr/share/vlc"
17 export PIXDIR="usr/share/pixmaps"
18 export GNOMEDIR="usr/share/gnome/apps/Multimedia"
19
20 build: build-stamp
21 build-stamp:
22         dh_testdir
23
24         case $(DEB_BUILD_ARCH) in \
25         i386) \
26                 ARCH_FLAGS="--enable-glide" ;; \
27         *) \
28                 ARCH_FLAGS="" ;; \
29         esac ;\
30         ./configure $$ARCH_FLAGS --mandir=$${prefix}/share/man \
31                 --infodir=$${prefix}/share/info \
32                 $(shell echo $(CONFIG_FLAGS)) $(shell echo $(DVDCSS_FLAGS))
33
34         $(MAKE)
35
36         touch build-stamp
37
38 clean:
39         dh_testdir
40         dh_testroot
41         rm -f build-stamp
42
43         -$(MAKE) distclean
44
45         dh_clean
46
47 install: build
48         dh_testdir
49         dh_testroot
50         dh_clean -k
51         dh_installdirs
52
53         DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
54
55         # make symlinks for packages and install plugins
56         case $(DEB_BUILD_ARCH) in \
57         i386) \
58                 ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa lirc aa xosd kde glide" ;; \
59         *) \
60                 ARCH_ALIASES="ggi gtk gnome esd sdl qt arts mad alsa lirc aa xosd kde" ;; \
61         esac ;\
62         for alias in $$ARCH_ALIASES ; do \
63                 ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
64                 mv debian/vlc/usr/lib/vlc/$$alias.so \
65                         debian/vlc-$$alias/usr/lib/vlc/ ; done
66
67         # do the same for the mozilla plugin
68         ln -s vlc debian/mozilla-plugin-vlc/usr/share/doc/mozilla-plugin-vlc
69         mv debian/vlc/usr/lib/mozilla debian/mozilla-plugin-vlc/usr/lib
70
71         # move binary aliases
72         mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
73         mv debian/vlc/usr/bin/gnome-vlc debian/vlc-gnome/usr/bin/
74         mv debian/vlc/usr/bin/qvlc debian/vlc-qt/usr/bin/
75         mv debian/vlc/usr/bin/kvlc debian/vlc-kde/usr/bin/
76
77         mv debian/vlc/$(VIDDIR)/vlc48x48.png debian/vlc/$(PIXDIR)/vlc.png
78         mv debian/vlc/$(VIDDIR)/gvlc32x32.xpm debian/vlc-gtk/$(VIDDIR)/gvlc.xpm
79         mv debian/vlc/$(VIDDIR)/gvlc48x48.png debian/vlc-gtk/$(PIXDIR)/gvlc.png
80         mv debian/vlc/$(VIDDIR)/gnome-vlc32x32.xpm debian/vlc-gnome/$(VIDDIR)/gnome-vlc.xpm
81         mv debian/vlc/$(VIDDIR)/gnome-vlc48x48.png debian/vlc-gnome/$(PIXDIR)/gnome-vlc.png
82         mv debian/vlc/$(VIDDIR)/qvlc32x32.xpm debian/vlc-qt/$(VIDDIR)/qvlc.xpm
83         mv debian/vlc/$(VIDDIR)/qvlc48x48.png debian/vlc-qt/$(PIXDIR)/qvlc.png
84         mv debian/vlc/$(VIDDIR)/kvlc32x32.xpm debian/vlc-kde/$(VIDDIR)/kvlc.xpm
85         mv debian/vlc/$(VIDDIR)/kvlc48x48.png debian/vlc-kde/$(PIXDIR)/kvlc.png
86
87         cp debian/vlc.desktop debian/vlc/$(GNOMEDIR)
88         cp debian/gvlc.desktop debian/vlc-gtk/$(GNOMEDIR)
89         cp debian/gnome-vlc.desktop debian/vlc-gnome/$(GNOMEDIR)
90
91         #gzip -9 < doc/vlc.1 >| debian/vlc/usr/share/man/man1/vlc.1.gz
92         ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
93         ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gnome-vlc.1.gz
94         ln -s vlc.1.gz debian/vlc-qt/usr/share/man/man1/qvlc.1.gz
95         ln -s vlc.1.gz debian/vlc-kde/usr/share/man/man1/kvlc.1.gz
96
97 # Build architecture-independent files here.
98 binary-indep: build install
99 # We have nothing to do by default.
100
101 # Build architecture-dependent files here.
102 binary-arch: build install
103 #       dh_testversion
104         dh_testdir
105         dh_testroot
106 #       dh_installdebconf       
107         dh_installdocs
108 #       dh_installexamples
109         dh_installmenu
110 #       dh_installemacsen
111 #       dh_installpam
112 #       dh_installinit
113 #       dh_installcron
114         dh_installman doc/vlc.1
115 #       dh_installinfo
116 #       dh_undocumented
117         dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-alsa -Nvlc-sdl -Nvlc-qt -Nvlc-arts -Nvlc-mad -Nvlc-lirc -Nvlc-aa -Nvlc-xosd -Nvlc-kde -Nmozilla-plugin-vlc ChangeLog
118         dh_link
119         dh_strip
120         dh_compress
121         dh_fixperms
122         dh_makeshlibs
123         dh_installdeb
124 #       dh_perl
125
126         case $(DEB_BUILD_ARCH) in \
127         i386) \
128                 ARCH_EXCLUDE="" ;; \
129         *) \
130                 ARCH_EXCLUDE="-Nvlc-glide" ;; \
131         esac ;\
132         dh_shlibdeps $$ARCH_EXCLUDE ;\
133         dh_gencontrol $$ARCH_EXCLUDE ;\
134         dh_md5sums $$ARCH_EXCLUDE ;\
135         dh_builddeb $$ARCH_EXCLUDE
136
137 binary: binary-indep binary-arch
138 .PHONY: build clean binary-indep binary-arch binary install
139