Added documentation on using lastfmsubmitd, and made ready for 1.2 release.
[gssmp.git] / Makefile.am
blob547b168203cc1454ec7151a2f7e67284e769642f
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = src po
5 EXTRA_DIST = \
6         autogen.sh \
7         gssmp.glade \
8         gssmp.gladep
10 APP_NAME=gssmp
11 TMP_DIR=/tmp/$(APP_NAME)
13 install-data-local: install/gssmp.1.gz
14         @$(NORMAL_INSTALL)
15         $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps; \
16         $(INSTALL_DATA) $(srcdir)/pixmaps/gssmp.png $(DESTDIR)$(datadir)/pixmaps;
17         $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/$(PACKAGE); \
18         for docfile in AUTHORS COPYING INSTALL NEWS README TODO; do \
19           if test -f $$docfile; then \
20             $(INSTALL_DATA) $$docfile $(DESTDIR)$(datadir)/doc/$(PACKAGE); \
21           fi \
22         done
23         $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/$(PACKAGE)/html; \
24         for docfile in www/COPYING www/*.html www/*.css www/*.png; do \
25           $(INSTALL_DATA) $$docfile $(DESTDIR)$(datadir)/doc/$(PACKAGE)/html; \
26         done
27         $(mkinstalldirs) $(DESTDIR)$(datadir)/man/man1; \
28         $(INSTALL_DATA) install/gssmp.1.gz $(DESTDIR)$(datadir)/man/man1;
29         $(mkinstalldirs) $(DESTDIR)$(datadir)/applications; \
30         $(INSTALL_DATA) install/gssmp.desktop $(DESTDIR)$(datadir)/applications;
32 dist-hook:
33         if test -d pixmaps; then \
34           mkdir $(distdir)/pixmaps; \
35           for pixmap in pixmaps/*; do \
36             if test -f $$pixmap; then \
37               cp -p $$pixmap $(distdir)/pixmaps; \
38             fi \
39           done \
40         fi
42 install/gssmp.1.gz: install/gssmp.1
43         gzip --stdout install/gssmp.1 > install/gssmp.1.gz
45 pkg-src:
46         mkdir -p pkg
47         rm -f pkg/$(APP_NAME)-*.tar.bz2
48         - rm -r $(TMP_DIR)
49         mkdir $(TMP_DIR)
50         cg-export $(TMP_DIR)/$(APP_NAME)-$(VERSION)/
51         cp -r configure install-sh Makefile.in config.h.in mkinstalldirs \
52                 autom4te.cache missing stamp-h.in $(TMP_DIR)/$(APP_NAME)-$(VERSION)/
53         cp src/Makefile.in $(TMP_DIR)/$(APP_NAME)-$(VERSION)/src/
54         tar --directory $(TMP_DIR)/ -cjf pkg/$(APP_NAME)-$(VERSION).tar.bz2 \
55                 $(APP_NAME)-$(VERSION)
56         rm -r $(TMP_DIR)
58 pkg-bin: pkg-src install/gssmp.1.gz all
59         - rm -r $(TMP_DIR)
60         mkdir -p $(TMP_DIR)/$(APP_NAME)-$(VERSION)-bin/
61         tar --directory $(TMP_DIR)/ -xjf pkg/$(APP_NAME)-$(VERSION).tar.bz2
62         cd $(TMP_DIR)/$(APP_NAME)-$(VERSION)/; \
63                 ./configure --prefix=$(TMP_DIR)/$(APP_NAME)-$(VERSION)-bin
64         make --directory $(TMP_DIR)/$(APP_NAME)-$(VERSION)
65         make --directory $(TMP_DIR)/$(APP_NAME)-$(VERSION) install
66         tar --directory $(TMP_DIR)/ -cjf pkg/$(APP_NAME)-$(VERSION)-bin.tar.bz2 \
67                 $(APP_NAME)-$(VERSION)-bin
68         rm -r $(TMP_DIR)
70 # Create a deb package
71 pkg-deb: pkg-src
72         - rm -r $(TMP_DIR)
73         mkdir -p $(TMP_DIR)
74         cp pkg/$(APP_NAME)-$(VERSION).tar.bz2 $(TMP_DIR)/
75         tar --directory $(TMP_DIR)/ \
76                 -xjf $(TMP_DIR)/$(APP_NAME)-$(VERSION).tar.bz2
77         cd $(TMP_DIR)/$(APP_NAME)-$(VERSION)/; \
78                 echo | dh_make --single --copyright gpl -e axis3x3@users.sf.net -f \
79                         ../$(APP_NAME)-$(VERSION).tar.bz2
80         cp install/deb/changelog install/deb/control \
81                 install/deb/copyright $(TMP_DIR)/$(APP_NAME)-$(VERSION)/debian/
82         cd $(TMP_DIR)/$(APP_NAME)-$(VERSION)/; \
83                 rm debian/README.Debian debian/*.ex debian/*.EX; \
84                 ./configure; \
85                 dpkg-buildpackage -rfakeroot; \
86                 mv ../*.deb $(PWD)/pkg/
87         rm -r $(TMP_DIR);
89 # Create an RPM package
90 pkg-rpm: pkg-src
91         mkdir -p $(HOME)/.rpm/RPMS/i386
92         mkdir -p $(HOME)/.rpm/SRPMS
93         mkdir -p $(HOME)/.rpm/BUILD
94         mkdir -p $(HOME)/.rpm/SOURCES
95         mkdir -p $(HOME)/.rpm/tmp
96         - rm -r $(HOME)/.rpm/BUILD/$(APP_NAME)-root
97         - rm -r $(HOME)/.rpm/RPMS/$(APP_NAME)-*
98         - rm -r $(HOME)/.rpm/SRPMS/$(APP_NAME)-*
99         - rm -r $(HOME)/.rpm/SOURCES/$(APP_NAME)-*
100         cp pkg/$(APP_NAME)-$(VERSION).tar.bz2 $(HOME)/.rpm/SOURCES/
101         rpmbuild --quiet --nodeps --define="_topdir $(HOME)/.rpm" -ba install/rpm/gssmp.spec
102         mv $(HOME)/.rpm/RPMS/i386/$(APP_NAME)-$(VERSION)-*.i386.rpm pkg/
104 # Make all binary packages, ready to upload to sourceforge
105 pkg-all: pkg-bin pkg-deb pkg-rpm
106         
107 # Push the current source code to my git repository
108 git-upload:
109         - rm -r $(TMP_DIR)
110         git-repack -d
111         git clone --bare -l . $(TMP_DIR)/$(APP_NAME).git
112         rsync -r --delete $(TMP_DIR)/$(APP_NAME).git/ \
113                 artific2@artificialworlds.net:public_html/gssmp/git/gssmp.git/
114         rm -r $(TMP_DIR);