# Makefile.am
-SUBDIRS = doc src test etc scripts
-DIST_SUBDIRS = config doc src test etc scripts
-EXTRA_DIST = lxc.spec CONTRIBUTING MAINTAINERS ChangeLog
+ACLOCAL_AMFLAGS = -I config
+
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+SUBDIRS = config src templates doc hooks
+DIST_SUBDIRS = config src templates doc hooks
+EXTRA_DIST = \
+ autogen.sh \
+ lxc.spec \
+ CONTRIBUTING \
+ MAINTAINERS
+
+RPMARGS =
+
+pcdatadir = $(libdir)/pkgconfig
+pcdata_DATA = lxc.pc
+
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status libtool
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(LXCPATH)
+ $(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/lxc
ChangeLog::
@touch ChangeLog
-dist-hook:
- -@cvs2cl
- @mv ChangeLog $(distdir)
-
rpm: dist
- rpmbuild --clean -ta ${distdir}.tar.gz
+ rpmbuild --clean -ta ${distdir}.tar.gz $(RPMARGS)