mystilleef / FedoraZram

Scripts that enable zram for Fedora
73 stars 48 forks source link

Change the path of SYSTEMD_UNITDIR from /lib/systemd/system to #9

Closed ataliba closed 9 years ago

ataliba commented 10 years ago

Hello,

I have problems to create the rpm file with the make rpm command on my Fedora 19.

I receive this error :

RPM build errors: File not found: /home/ataliba/rpmbuild/BUILDROOT/zram-1.0.0-0.fc19.x86_64/usr/lib/systemd/system/zram.service make: *\ [rpm] Error 1 [ataliba@neo FedoraZram]$ vim Makefile

Reading the Makefile i see an problem because the /lib on Fedora 19 is a symbolic link to /usr/lib I change the variable SYSTEMD_UNITDIR to /usr/lib/systemd/system

and the command make rpm runs without problems.

gunchev commented 10 years ago

I incorporated this fix plus some more here - https://github.com/mr700/FedoraZram , builds on Fedora 19

eqhmcow commented 10 years ago

I hit this issue and fixed by adding PREFIX:

diff --git a/Makefile b/Makefile
index 472d743..047c591 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ install:
        install -m 0755 zramstat $(DESTDIR)$(PREFIX)/sbin

        install -d $(DESTDIR)$(SYSTEMD_UNITDIR)
-       install -m 0644 zram.service $(DESTDIR)$(SYSTEMD_UNITDIR)
+       install -m 0644 zram.service $(DESTDIR)$(PREFIX)$(SYSTEMD_UNITDIR)

        install -d $(DESTDIR)$(SYSCONFDIR)
        install -m 0644 zram $(DESTDIR)$(SYSCONFDIR)
ataliba commented 10 years ago

Humm interesting. i will try this too here :-)

Vlad1mir-D commented 9 years ago

https://github.com/mystilleef/FedoraZram/pull/11