~charles-roduit/openfovea/display_ym_fit

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Charles Roduit
  • Date: 2012-08-03 19:35:33 UTC
  • mfrom: (157.1.3 deb-med-packaging)
  • Revision ID: charles.roduit@gmail.com-20120803193533-0y0jo8ekr6coce3o
Makefile compatible with debian. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
VERSION=0.1a$(REVNO)
9
9
CHANGE=s/0.1a0/$(VERSION)/ # Modified by Makefile
10
10
REVERT=s/$(VERSION)/0.1a0/
11
 
 
12
 
testit:
13
 
        #cp openfovea/common.py openfovea/common.py.old
14
 
        #sed "s/^APP_VERSION = \"[0-9.a-z]*\"/APP_VERSION = \"${VERSION}\"/" openfovea/common.py > openfovea/common.py.new
15
 
        #cp openfovea/common.py.new openfovea/common.pysed
16
 
        sed "s/^    <property name=\"version\">[0-9.a-z]*<\/property>/    <property name=\"version\">${VERSION}<\/property>/" test
 
11
PRJNAME=$(PROJECT)-0.1a$(REVNO)
 
12
 
 
13
builddeb:
 
14
        $(MAKE) apply_change
 
15
        $(MAKE) source
 
16
        @echo $(COMPILE)
 
17
        @echo $(PROJECT)-0.1a$(REVNO).tar.gz
 
18
        #Give the correct .orig name
 
19
        mv ./dist/$(PROJECT)-0.1a$(REVNO).tar.gz ./dist/$(PROJECT)_0.1a$(REVNO).orig.tar.gz
 
20
        cd ./dist/$(PRJNAME); dpkg-buildpackage
 
21
 
17
22
all:
18
23
        @echo "make source - Create source package"
19
24
        @echo "make install - Install on local system"
41
46
        $(MAKE) apply_change
42
47
        # Make the source
43
48
        $(PYTHON) setup.py sdist $(COMPILE)
 
49
        cd ./dist; tar -xvzf $(PRJNAME).tar.gz
 
50
        cp -r debian ./dist/$(PRJNAME)
44
51
        # Revert the changes
45
52
        $(MAKE) revert_change
46
53
 
51
58
buildrpm:
52
59
        $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
53
60
 
54
 
builddeb:
55
 
        @echo $(VERSION)
56
 
        @echo "***************************************"
57
 
        @echo "*                        IN MAKEFILE                              *"
58
 
        @echo "***************************************"
59
 
        @echo "Change the revision number in setup.py, changelog, and openfovea.glade"
60
 
        cp openfovea/common.py openfovea/common.py.old
61
 
        cp debian/changelog debian/changelog.old
62
 
        cp openfovea/glade/openfovea.glade openfovea/glade/openfovea.glade.old
63
 
        sed "s/^APP_VERSION = \"[0-9.a-z]*\"/APP_VERSION = \"${VERSION}\"/" openfovea/common.py > openfovea/common.py.new
64
 
        sed "s/^openfovea ([0-9.a-z]*) UNRELEASED; urgency=lowcommit/openfovea \(${VERSION}\) UNRELEASED; urgency=lowcommit/" debian/changelog > debian/changelog.new
65
 
        sed "s/^    <property name=\"version\">[0-9.a-z]*<\/property>/    <property name=\"version\">${VERSION}<\/property>/" openfovea/glade/openfovea.glade > openfovea/glade/openfovea.glade.new
66
 
        cp openfovea/common.py.new openfovea/common.py
67
 
        cp debian/changelog.new debian/changelog
68
 
        cp openfovea/glade/openfovea.glade.new openfovea/glade/openfovea.glade
69
 
        #sed $(CHANGE) debian/changelog.seed > debian/changelog
70
 
        #sed $(CHANGE) openfovea/glade/openfovea.seed.glade > openfovea/glade/openfovea.glade
71
 
        @echo "make builddeb"
72
 
        # build the source package in the parent directory
73
 
        # then rename it to project_version.orig.tar.gz
74
 
        @echo $(COMPILE)
75
 
        $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune
76
 
        #cp openfovea.desktop $(BUILDIR)/usr/share/applications/openfovea.desktop
77
 
        rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)-$$1\.orig\.tar\.gz/' ../*
78
 
        # build the package
79
 
        dpkg-buildpackage -d -i -I -rfakeroot -uc -us
80
 
        # Revert changes made for tracking the OpenFovea version.
81
 
        cp openfovea/common.py.old openfovea/common.py
82
 
        cp debian/changelog.old debian/changelog
83
 
        cp openfovea/glade/openfovea.glade.old openfovea/glade/openfovea.glade
84
 
 
85
61
buildwin:
86
62
        @echo "Make windows package"
87
63
        $(MAKE) apply_change
89
65
        $(PYTHON) setup.py bdist_wininst
90
66
        $(MAKE) revert_change
91
67
        @echo "Changes are reverted"
92
 
        
 
68
 
93
69
preparewin:
94
70
        @echo "apply changes for windows"
95
71
        $(MAKE) apply_change