Cleaned up showing or hiding the symbol area
[gonvert] / original.mak
1 NAME=gonvert
2
3 #Get version number from source file
4 VERSION=$(shell head -3 $(NAME) | grep version | cut -d\" -f2)
5
6 #DESTDIR can be defined when calling make ie. make install DESTDIR=$RPM_BUILD_ROOT
7 prefix  = /usr/local
8 bindir  = $(prefix)/bin
9 datadir = $(prefix)/share
10 docdir  = $(datadir)/doc
11
12 DESTDIR =
13
14 all:
15
16 install:
17         install -D -m0755 gonvert $(DESTDIR)$(bindir)/gonvert
18         install -D -m0644 gonvert.glade $(DESTDIR)$(datadir)/gonvert/gonvert.glade
19         install -d -m0755 $(DESTDIR)$(datadir)/pixmaps/
20         install -m0644 pixmaps/*.png $(DESTDIR)$(datadir)/pixmaps/
21         install -D -m0644 gonvert.desktop $(DESTDIR)$(datadir)/gnome/apps/Utilities/gonvert.desktop
22         install -d -m0755 $(DESTDIR)$(docdir)/gonvert/
23         install -m0644 doc/* $(DESTDIR)$(docdir)/gonvert/
24
25 install_pl:
26         install -D -m0755 gonvert $(DESTDIR)$(bindir)/gonvert
27         install -D -m0644 gonvert.glade $(DESTDIR)$(datadir)/gonvert/gonvert.glade
28         install -d -m0755 $(DESTDIR)$(datadir)/pixmaps/
29         install -m0644 pixmaps/*.png $(DESTDIR)$(datadir)/pixmaps/
30         install -D -m0644 gonvert.desktop $(DESTDIR)$(datadir)/gnome/apps/Utilities/gonvert.desktop
31         install -d -m0755 $(DESTDIR)$(docdir)/gonvert/
32         install -m0644 doc/* $(DESTDIR)$(docdir)/gonvert/
33         install -m0644 i18n/pl_messages.gmo /usr/share/locale/pl/LC_MESSAGES/gonvert.mo
34
35 uninstall:
36         #specify project name manually to prevent removal of all directories
37         rm -f  $(bindir)/gonvert
38         rm -rf $(datadir)/gonvert*
39         rm -rf $(docdir)/gonvert*
40         rm -f /usr/share/gnome/apps/Utilities/$(NAME).desktop
41         rm -f /usr/share/pixmaps/$(NAME).png
42
43 uninstall_pl:
44         #specify project name manually to prevent removal of all directories
45         rm -f  $(bindir)/gonvert
46         rm -rf $(datadir)/gonvert*
47         rm -rf $(docdir)/gonvert*
48         rm -f /usr/share/gnome/apps/Utilities/$(NAME).desktop
49         rm -f /usr/share/pixmaps/$(NAME).png
50         rm -f /usr/share/locale/pl/LC_MESSAGES/gonvert.mo
51
52 dist:
53         if test -d "$(NAME)-$(VERSION)"; then rm -rf $(NAME)-$(VERSION); fi
54         if test -f "$(NAME)-$(VERSION).tar.gz"; then rm -f $(NAME)-$(VERSION).tar.gz; fi
55         mkdir $(NAME)-$(VERSION)
56         cp Makefile $(NAME)-$(VERSION)
57         cp messages.pot $(NAME)-$(VERSION)
58         cp -R i18n $(NAME)-$(VERSION)
59         cp -R doc $(NAME)-$(VERSION)
60         cp $(NAME) $(NAME)-$(VERSION)
61         cp $(NAME).glade $(NAME)-$(VERSION)
62         cp $(NAME).spec $(NAME)-$(VERSION)
63         cp $(NAME).desktop $(NAME)-$(VERSION)
64         cp -R pixmaps $(NAME)-$(VERSION)
65         tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
66         rm -rf $(NAME)-$(VERSION)
67
68 rpm:
69         #You will most likely have to be root for this to work
70         sed '/Version/s/replaceme/$(VERSION)/' gonvert.spec.skel > gonvert.spec
71         cp $(NAME).spec /usr/src/redhat/SPECS/$(NAME).spec
72         cp $(NAME)-$(VERSION).tar.gz /usr/src/redhat/SOURCES
73         rpmbuild -ba /usr/src/redhat/SPECS/gonvert.spec
74         cp /usr/src/redhat/RPMS/noarch/gonvert-$(VERSION)*.rpm ~anthony/web/unihedron/projects/gonvert/downloads
75
76 pub:
77         #For authors use only
78         if test -f "$(NAME)"; then cp $(NAME)  ~/web/unihedron/projects/gonvert/downloads/$(NAME).pyw; fi
79         if test -f "$(NAME).glade"; then cp $(NAME).glade  ~/web/unihedron/projects/gonvert/downloads; fi
80         if test -f "$(NAME)-$(VERSION).tar.gz"; then mv -f $(NAME)-$(VERSION).tar.gz  ~/web/unihedron/projects/gonvert/downloads; fi
81         if test -f "doc/CHANGELOG"; then cp -f doc/CHANGELOG  ~/web/unihedron/projects/gonvert/CHANGELOG; fi