Magellan Linux

Annotation of /branches/mage-next/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2226 - (hide annotations) (download)
Wed Oct 16 07:51:30 2013 UTC (11 years ago) by niro
Original Path: trunk/mage/Makefile
File size: 2915 byte(s)
-fixed whitespaces
1 niro 363 # Magellan Package Management
2 niro 603 # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/Makefile,v 1.3 2007-11-05 19:36:36 niro Exp $
3 niro 363
4 niro 2226 DESTDIR =
5     VERSION = $(shell cat VERSION)
6     ARCH = $(shell uname -m)
7 niro 363
8 niro 1678 ifeq ($(ARCH), x86_64)
9 niro 2226 MTUNE = generic
10 niro 1678 else
11 niro 2226 MTUNE = $(ARCH)
12 niro 1678 endif
13    
14 niro 2226 sysconfdir = /etc
15     libdir = /usr/lib/mage
16     sbindir = /sbin
17     datadir = /usr/share/doc/mage-$(VERSION)
18 niro 363
19 niro 2226 srcdir = .
20     srclib = $(srcdir)/usr/lib/mage
21     srcdoc = $(srcdir)/usr/share/doc/mage
22     srcetc = $(srcdir)/etc
23 niro 363
24     all: install
25    
26     create-dirs:
27     install -d -m 0755 $(DESTDIR)$(sysconfdir)
28     install -d -m 0755 $(DESTDIR)$(libdir)
29     install -d -m 0755 $(DESTDIR)$(sbindir)
30     install -d -m 0755 $(DESTDIR)$(datadir)
31    
32     install-files:
33 niro 368 install -m 0644 $(srcdir)/etc/etc-update.conf $(DESTDIR)$(sysconfdir)
34     install -m 0644 $(srcdir)/etc/mage.rc.example $(DESTDIR)$(sysconfdir)
35 niro 363 install -m 0755 $(srclib)/compressdoc $(DESTDIR)$(libdir)
36     install -m 0755 $(srclib)/create_desktop_app.sh $(DESTDIR)$(libdir)
37     install -m 0755 $(srclib)/depwalker.sh $(DESTDIR)$(libdir)
38     install -m 0755 $(srclib)/env-rebuild.sh $(DESTDIR)$(libdir)
39     install -m 0755 $(srclib)/etc-update $(DESTDIR)$(libdir)
40     install -m 0644 $(srclib)/mage4.functions.sh $(DESTDIR)$(libdir)
41     install -m 0755 $(srclib)/mage4.sh $(DESTDIR)$(libdir)
42     install -m 0755 $(srclib)/magequery.sh $(DESTDIR)$(libdir)
43 niro 1678 sed -e "s:@@ARCH@@:$(ARCH):g" \
44     -e "s:@@MTUNE@@:$(MTUNE):g" \
45     $(srclib)/mage.rc.global.in \
46 niro 1606 > $(DESTDIR)$(libdir)/mage.rc.global
47 niro 363 install -m 0755 $(srclib)/mgroupadd $(DESTDIR)$(libdir)
48     install -m 0755 $(srclib)/mgroupdel $(DESTDIR)$(libdir)
49     install -m 0755 $(srclib)/mkinfodir $(DESTDIR)$(libdir)
50     install -m 0755 $(srclib)/museradd $(DESTDIR)$(libdir)
51     install -m 0755 $(srclib)/muserdel $(DESTDIR)$(libdir)
52     install -m 0755 $(srclib)/pkgbuild_dir.sh $(DESTDIR)$(libdir)
53     install -m 0755 $(srclib)/smage2.sh $(DESTDIR)$(libdir)
54 niro 1640 install -m 0644 $(srclib)/smage2.functions.sh $(DESTDIR)$(libdir)
55 niro 363 install -m 0644 $(srcdoc)/template.{mage,smage2} $(DESTDIR)$(datadir)
56 niro 1442 install -m 0644 $(srcdir)/ChangeLog $(DESTDIR)$(datadir)
57 niro 1439 echo "$(VERSION)" > $(DESTDIR)$(libdir)/version
58 niro 363
59 niro 1643 # include some useful scripts
60     install -m 0755 $(srclib)/ldd-fix.sh $(DESTDIR)$(libdir)
61     install -m 0755 $(srclib)/pkg_all_sources.sh $(DESTDIR)$(libdir)
62     install -m 0755 $(srclib)/autodepend.sh $(DESTDIR)$(libdir)
63     install -m 0755 $(srclib)/search_soname.sh $(DESTDIR)$(libdir)
64    
65 niro 363 install-symlinks:
66     ln -snf $(libdir)/mage4.sh $(DESTDIR)$(sbindir)/mage
67     ln -snf $(libdir)/smage2.sh $(DESTDIR)$(sbindir)/smage2
68     ln -snf $(libdir)/env-rebuild.sh $(DESTDIR)$(sbindir)/env-rebuild
69     ln -snf $(libdir)/compressdoc $(DESTDIR)$(sbindir)/compressdoc
70     ln -snf $(libdir)/etc-update $(DESTDIR)$(sbindir)/etc-update
71     ln -snf $(libdir)/magequery.sh $(DESTDIR)$(sbindir)/magequery
72     ln -snf $(libdir)/mage.rc.global $(DESTDIR)$(sysconfdir)/mage.rc.global
73    
74     install: create-dirs \
75     install-files \
76     install-symlinks
77    
78     .PHONY: all install