debian/rules
author laurent
Mon, 19 Dec 2011 01:56:13 +0100
changeset 655 5becd66cca02
parent 432 ef7fc6fd1f6f
permissions -rwxr-xr-x
Fixing bug when loading icons for plugin's editor tabs
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     1
#!/usr/bin/make -f
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     2
# -*- makefile -*-
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     3
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     4
# Uncomment this to turn on verbose mode.
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     5
#export DH_VERBOSE=1
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     6
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     7
CFLAGS = -Wall -g
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     8
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
     9
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    10
	CFLAGS += -O0
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    11
else
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    12
	CFLAGS += -O2
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    13
endif
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    14
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    15
configure: configure-stamp
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    16
configure-stamp:
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    17
	dh_testdir
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    18
	touch configure-stamp
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    19
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    20
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    21
build: build-stamp
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    22
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    23
build-stamp: configure-stamp 
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    24
	dh_testdir
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    25
	touch $@
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    26
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    27
clean:
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    28
	dh_testdir
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    29
	dh_testroot
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    30
	rm -f build-stamp configure-stamp
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    31
	dh_clean 
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    32
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    33
install: build
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    34
	dh_testdir
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    35
	dh_testroot
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    36
	dh_clean -k 
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    37
	dh_installdirs
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    38
432
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    39
	# Copy source files
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    40
	mkdir -p $(CURDIR)/debian/beremiz/usr/share/beremiz
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    41
	cp -a images $(CURDIR)/debian/beremiz/usr/share/beremiz
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    42
	cp -a plugins $(CURDIR)/debian/beremiz/usr/share/beremiz
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    43
	cp -a runtime $(CURDIR)/debian/beremiz/usr/share/beremiz
318
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
    44
	cp -a tests $(CURDIR)/debian/beremiz/usr/share/beremiz
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
    45
	cp -a connectors $(CURDIR)/debian/beremiz/usr/share/beremiz
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
    46
	cp -a targets $(CURDIR)/debian/beremiz/usr/share/beremiz
432
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    47
	cp -a doc $(CURDIR)/debian/beremiz/usr/share/beremiz
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    48
	cp -a locale $(CURDIR)/debian/beremiz/usr/share/beremiz
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    49
	cp *.js $(CURDIR)/debian/beremiz/usr/share/beremiz
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    50
	cp *.py $(CURDIR)/debian/beremiz/usr/share/beremiz
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    51
432
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    52
	# Copy desktop directory file
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    53
	mkdir -p $(CURDIR)/debian/beremiz/usr/share/desktop-directories
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    54
	cp debian/Beremiz.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    55
	cp debian/Beremiz_demos.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    56
	cp debian/Beremiz_docs.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    57
	
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    58
	# Copy desktop menu file
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    59
	mkdir -p $(CURDIR)/debian/beremiz/etc/xdg/menus/applications-merged
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    60
	cp debian/beremiz.menu $(CURDIR)/debian/beremiz/etc/xdg/menus/applications-merged
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    61
	
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    62
	# Copy desktop entry files
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    63
	mkdir -p $(CURDIR)/debian/beremiz/usr/share/applications
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    64
	cp debian/beremiz.desktop $(CURDIR)/debian/beremiz/usr/share/applications/
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    65
	cp debian/beremiz_svgui.desktop $(CURDIR)/debian/beremiz/usr/share/applications/
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    66
	cp debian/beremiz_wxglade.desktop $(CURDIR)/debian/beremiz/usr/share/applications/
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    67
	cp debian/beremiz_doc.desktop $(CURDIR)/debian/beremiz/usr/share/applications/
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    68
	
318
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
    69
	rm -rf `find .|grep CVS`
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
    70
	rm -rf `find .|grep .cvsignore`
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    71
	chmod -R a+r $(CURDIR)/debian/beremiz
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    72
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    73
# Build architecture-independent files here.
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    74
binary-indep: build install
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    75
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    76
# Build architecture-dependent files here.
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    77
binary-arch: build install
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    78
	dh_testdir
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    79
	dh_testroot
432
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    80
#	dh_installchangelogs 
ef7fc6fd1f6f Add Beremiz shortcuts in menu on linux platform
greg
parents: 318
diff changeset
    81
#	dh_installdocs
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    82
	dh_installexamples
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    83
#	dh_install
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    84
#	dh_installmenu
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    85
#	dh_installdebconf	
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    86
#	dh_installlogrotate
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    87
#	dh_installemacsen
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    88
#	dh_installpam
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    89
#	dh_installmime
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    90
#	dh_python
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    91
#	dh_installinit
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    92
#	dh_installcron
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    93
#	dh_installinfo
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    94
	dh_installman
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    95
	dh_link
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    96
	dh_strip
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    97
	dh_compress
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    98
	dh_fixperms
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
    99
#	dh_perl
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   100
#	dh_makeshlibs
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   101
	dh_installdeb
318
b24790c748ae updated : debian package scripts
greg
parents: 92
diff changeset
   102
#	dh_shlibdeps
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   103
	dh_gencontrol
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   104
	dh_md5sums
92
b4e25e5030d4 remove deb_dist in debian/rules
greg
parents: 91
diff changeset
   105
	dh_builddeb
91
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   106
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   107
binary: binary-indep binary-arch
8d6dd867cf27 add debian dir to create debian package
greg
parents:
diff changeset
   108
.PHONY: build clean binary-indep binary-arch binary install configure