diff --git a/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory b/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory
new file mode 100644
index 0000000000000000000000000000000000000000..f145dbf812bbd24d6191996e9591cc987d0a7eb2
--- /dev/null
+++ b/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory
@@ -0,0 +1,5 @@
+<directory>
+  <entry name="test.txt"/>
+  <entry name="file2"/>
+  <entry name="file3"/>
+</directory>
diff --git a/src/api/tmp/cache/.gitignore b/src/api/tmp/cache/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..3192a3b7103c8a667e452081b8f182ef032cf0f1
--- /dev/null
+++ b/src/api/tmp/cache/.gitignore
@@ -0,0 +1,2 @@
+# This file is needed to keep the directory
+*
diff --git a/src/api/tmp/pids/.gitignore b/src/api/tmp/pids/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..276ad58c3dde01e275a4507c99a266fc3b77aeee
--- /dev/null
+++ b/src/api/tmp/pids/.gitignore
@@ -0,0 +1 @@
+# This file is needed to keep the directory
diff --git a/src/api/tmp/sessions/.gitignore b/src/api/tmp/sessions/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..276ad58c3dde01e275a4507c99a266fc3b77aeee
--- /dev/null
+++ b/src/api/tmp/sessions/.gitignore
@@ -0,0 +1 @@
+# This file is needed to keep the directory
diff --git a/src/api/tmp/sockets/.gitignore b/src/api/tmp/sockets/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..276ad58c3dde01e275a4507c99a266fc3b77aeee
--- /dev/null
+++ b/src/api/tmp/sockets/.gitignore
@@ -0,0 +1 @@
+# This file is needed to keep the directory
diff --git a/src/backend/Makefile b/src/backend/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..16451f8d74f04c119615c7b0efa030f74148186a
--- /dev/null
+++ b/src/backend/Makefile
@@ -0,0 +1,41 @@
+include ../../Makefile.include
+
+OBS_BACKEND_DATA_SUBDIRS := build events info jobs log projects repos run sources trees workers
+OBS_BACKEND_DATA_DIR := /srv/obs
+
+prepare_dirs:
+	$(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_PREFIX)
+	$(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_DATA_DIR)
+
+bs_config:
+	[ -f ./BSConfig.pm ] || cp ./BSConfig.pm.template ./BSConfig.pm
+	
+
+install: prepare_dirs install_data_dirs bs_config
+	# prevent error while copy if there is an previous installation
+	rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/build
+	cp -a ./* $(DESTDIR)$(OBS_BACKEND_PREFIX)
+	rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/Makefile
+	rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/t
+	rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/testdata
+	rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/examples
+	# just for check section, it is a %%ghost
+	ln -sf /usr/lib/build $(DESTDIR)$(OBS_BACKEND_PREFIX)/build 
+
+install_data_dirs: prepare_dirs
+	$(foreach data_dir,$(OBS_BACKEND_DATA_SUBDIRS), \
+		$(shell $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_DATA_DIR)/$(data_dir) ) \
+	)
+
+
+test_unit: bs_config clean_cover
+	rm -rf t/tmp/*
+	PERL5OPT=-MDevel::Cover LANG=C prove -Ibuild -I. -v t/*.t
+
+cover: test_unit
+	cover -ignore_re '^((build|XML|t)/|/usr/bin/prove$$)' -outputdir /srv/www/htdocs
+
+clean_cover:
+	rm -rf cover_db/
+
+.PHONY: test_unit cover