From 639354097c9b088af6309943de20520abf89f4c7 Mon Sep 17 00:00:00 2001 From: Dan Cojocaru Date: Sun, 5 Jun 2022 10:21:15 +0300 Subject: [PATCH] Added RPM spec file --- Makefile | 17 +++++++++++++++-- y3s2-gui-project.spec | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 y3s2-gui-project.spec diff --git a/Makefile b/Makefile index 6fb0854..3a7578f 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,24 @@ OBJ := obj CXX := g++ LD := g++ +DESTDIR?=/ +PREFIX=/usr +INSTALL?=install + SOURCES := $(wildcard $(SRC)/*.cpp) OBJECTS := $(patsubst $(SRC)/%.cpp, $(OBJ)/%.o, $(SOURCES)) -all: program +.PHONY: all +all: build + +.PHONY: build +build: program + +.PHONY: install +install: + ${INSTALL} -Dm755 program ${DESTDIR}${PREFIX}/bin/y3s2-gui-project +.PHONY: clean clean: rm -f program rm -rf obj @@ -17,4 +30,4 @@ program: ${OBJECTS} $(LD) ${LD_PARAMS} $^ -o $@ $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.cpp - $(CXX) ${CXX_PARAMS} $< -c -o $@ \ No newline at end of file + $(CXX) ${CXX_PARAMS} $< -c -o $@ diff --git a/y3s2-gui-project.spec b/y3s2-gui-project.spec new file mode 100644 index 0000000..9881db9 --- /dev/null +++ b/y3s2-gui-project.spec @@ -0,0 +1,32 @@ +Name: y3s2-gui-project +Version: 1.0.0 +Release: 1%{?dist} +Summary: Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2 + +License: UNLICENSED +URL: https://codeberg.org/kbruen/%{name} +Source0: https://codeberg.org/kbruen/%{name}/archive/v%{version}.tar.gz + +BuildRequires: mesa-libGLU-devel + +%description +Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2 + +%global debug_package %{nil} + +%prep +%autosetup -n %{name} + + +%build +%make_build +make build + + +%install +%make_install + + +%files +%{_bindir}/%{name} +