Files
entropy/client/Makefile
Sławomir Nizio 6d4a3f09e6 makefiles: establish a layout for sitedir installs
The idea is that:
- entropy.* imports will work as before (so any 3rd party clients will
  work as always) - installed in "entropy" package,
- new "_entropy" package to hold a namespace for private modules (like
  ones that required adding special directories to sys.path).
  (Underscored name for a top level Python module is not very common...
  anyway, it was inspired by "_emerge.")

Layout:
site-packages/
    entropy (backwards compatible)
	const.py
	...
    kswitch (also toplevel to keep compatibility)
	...
    _entropy
	eit
	magneto
	matter
	rigo
	RigoDaemon
	solo

(Note that site-packages does not need to be actually Python's
site-packages directory but anything as it is controlled by an argument
to make. It is however intended to be the sitedir.)

Another idea for a layout would be one that mimics sources checkout, but
the layout there is somewhat scattered. (And some ugliness would be
needed to make them modules before implicit namespaces from Python 3.3.
Anyway, imports would be long and ugly.)

Now, the layout of installed Entropy is lean; installation to virtualenv
is also possible (though there would be a need to call scripts like
"python equo.py" as shebangs are not converted).

Follow up changes are needed to make it work.
2018-11-26 20:15:36 +01:00

36 lines
1.1 KiB
Makefile

PKGNAME = entropy
SUBDIRS = doc po
PREFIX = /usr
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
PYTHON_SITEDIR = $(LIBDIR)
DESTDIR =
all:
for d in $(SUBDIRS); do $(MAKE) -C $$d; done
install:
install -d $(DESTDIR)/$(LIBDIR)/entropy/client
install -d $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/commands
install -d -m 775 $(DESTDIR)/etc/entropy
install -d $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(PREFIX)/share/man/man1
# copying portage bashrc
install -m 644 ../conf/client.conf $(DESTDIR)/etc/entropy/
install -m 644 solo/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/
install -m 644 solo/commands/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/commands/
install -m 644 revision $(DESTDIR)/$(LIBDIR)/entropy/client/
install -m 755 equo.py $(DESTDIR)/$(BINDIR)/equo
install -m 755 kernel-switcher $(DESTDIR)/$(BINDIR)/
# copy zsh completion
install -d $(DESTDIR)$(PREFIX)/share/zsh/site-functions
install -m 644 equo-completion.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_equo
for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
clean:
for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done