xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / Makefile.in (e71cdfe4c88b5a144f35719874e72ce508b1c854) (3,280B) (mode 100644) [raw]
.PHONY: all
all:	selinux compare

.PHONY: selinux
	@echo "Building SELinux..."
	cd selinux && ./build.sh

compare: compare.csv
	php misc/compare.php compare.csv root/themes/default/compare.html

.PHONY: clean
	make -C tests clean
	@-rm -f $(PRJ)-*.rpm $(PRJ)-*-*-*.tgz $(PRJ)-*.tar.gz
	@-rm -rf selinux/out
	@find . -type f -name '*.strace' -exec rm -f {} \;
	@find . -type f -name '*.log' -exec rm -f {} \;
	@find . -type f -name '*.out' -exec rm -f {} \;
	@find . -type f -name '*.bak' -exec rm -f {} \;

.PHONY: tests
	make -C tests all

install:	all
	@mkdir -pv $(I_USR_SHARE)/$(PRJ)
	cp -vdr inc hooks root scripts $(I_USR_SHARE)/$(PRJ)
	@echo "Installing configs..."
	@mkdir -pv $(I_ETC)/xinetd.d
	cp -vd --no-clobber samples/rg $(I_ETC)/xinetd.d/$(PRJ)
	@mkdir -pv $(I_ETC)/cron.d
	cp -vd --no-clobber samples/cron $(I_ETC)/cron.d/$(PRJ)
	@mkdir -pv $(I_ETC)/httpd/conf.d
	cp -vd samples/rg.conf $(I_ETC)/httpd/conf.d/$(PRJ).conf.sample
	@mkdir -pv $(I_ETC)/nginx/conf.d
	cp -vd samples/nginx.conf $(I_ETC)/nginx/conf.d/$(PRJ).conf.sample
	@mkdir -pv $(I_ETC)/$(PRJ)
	cp -vd samples/config.php $(I_ETC)/$(PRJ)/config.php.sample
	cp -vd --no-clobber samples/config.php $(I_ETC)/$(PRJ)/
	cp -vd --no-clobber samples/php-fpm.conf $(I_ETC)/$(PRJ)/
	cp -vd --no-clobber samples/pool.conf $(I_ETC)/$(PRJ)/
	cp -vd --no-clobber samples/worker-main.conf.sample $(I_ETC)/$(PRJ)/
	@mkdir -pv $(I_USR)/lib/systemd/system
	cp -vd samples/*.service $(I_USR)/lib/systemd/system/
	systemctl daemon-reload || :
	@echo "Installing tools..."
	@mkdir -pv $(I_USR_SBIN)
	cp -vd tools/* $(I_USR_SBIN)/
	@-chown root:root $(I_USR_SBIN)/rg_*
	@echo "Installing log stuff..."
	@mkdir -pv $(I_VAR_LOG)/$(PRJ)
	@-chown rocketgit:rocketgit $(I_VAR_LOG)/$(PRJ)
	@chmod 0770 $(I_VAR_LOG)/$(PRJ)
	@echo "Installing varlib stuff..."
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/locks
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/repos
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/q_merge_requests
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/qstats
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/sockets
	@echo "Fixing rights..."
	@-chown rocketgit:rocketgit $(I_VAR_LIB)/$(PRJ)
	@-chmod 0771 $(I_VAR_LIB)/$(PRJ)
	@mkdir -pv $(I_VAR_LIB)/$(PRJ)/tmp
	@chmod 0770 $(I_VAR_LIB)/$(PRJ)/tmp
	@echo "Installing SELinux stuff..."
	@mkdir -pv --mode=0755 $(I_USR_SHARE)/selinux/targeted
	cp -vd selinux/out/$(PRJ)-targeted.pp $(I_USR_SHARE)/selinux/targeted/$(PRJ).pp
	@echo "Done!"

.PHONY: push
	git push origin master
	git push origin --tags

.PHONY: docker
	@docker run --name rp --tty --detach \
	@(cd docker && sh prepare.sh)
	@docker run --name rg --tty --publish-all --link rp --detach \
		--volume ${PWD}:/usr/share/rocketgit:ro \
		--volume ${PWD}/docker/prepare/nginx.conf:/etc/nginx/conf.d/rocketgit.conf \
	@echo "Exported ports:"
	docker port rg
	@echo "Add in your /etc/hosts file the docker IP and 'drg' name."
	@echo "To attach to the rg machine: docker exec --tty --interactive rg bash"

.PHONY: docker-stop
	@-docker stop rp rg
	@-docker rm rp rg

# Computes the number of lines of the project
.PHONY: nol
	find . -type f \( -name '*.php' -o -name '*.sh' \) -exec cat {} \; \
		| wc -l

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master