Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about a .rpm package? #41

Open
thomask-gh opened this issue Dec 3, 2016 · 9 comments
Open

What about a .rpm package? #41

thomask-gh opened this issue Dec 3, 2016 · 9 comments

Comments

@thomask-gh
Copy link

Hi! I'm a Fedora user who used your software for years on Windows, so first, thanks a lot for it!
I saw that there was a .deb package for Debian/Ubuntu users but I'd love to install your software on my machine.

So I was just wondering if it would be possible for you to create a .rpm package for non-Debian-based-distribution Linux users? 😄

Thanks in advance (I'm not really an advanced linux user so I have absolutely no idea of how to do it myself...). 👍

@ghost
Copy link

ghost commented Dec 9, 2016

xfluxgui-rpm-deb-orig.zip

I don't have access to redhat/fedora/centos system, so I include a zip file that contains:

If you want to adapt them into your system, feel free to unzip the file above and work your way through.

Note that the alienated rpm package maybe (more likely), will not work on fedora/redhat or another redhat based distro, because the dependencies name maybe different. If you got a working rpm package, please upload them (as a zip) to this issue.

Build dependencies?

Based on debian/control

  • python-support (>=0.8.7)
  • dh-python, python

Dependencies to run?

Based on debian/control

  • python-appindicator(>=0.0.19)
  • python-gtk2(>=2.17.0)
  • python-glade2(>=2.17.0)
  • python-gconf(>=2.28.0)
  • python-xdg(>=0.18)
  • python-pexpect(>=2.3)

Change the dependencies name and version that suits your platform. Some of them might not be needed, or not available.

@thomask-gh
Copy link
Author

thomask-gh commented Dec 11, 2016

Okay, thanks for your help, I'll try when I'll get my Fedora installation to work again 😄

@ryanmt
Copy link

ryanmt commented Dec 14, 2016

I had to install a couple of things, but I still have a couple of run-time errors in looks like. I'll swing back when I get them resolved.

sudo dnf install python-appindicator gnome-python2-gconf pyxdg pygtk2-libglade

@westurner
Copy link

fpm may be helpful for generating {RPM, pacman,} packages:
https://github.com/jordansissel/fpm/wiki/ConvertingPython (setup.py)
https://github.com/jordansissel/fpm/wiki/Debuild-to-fpm (./debian)

The fpm CLI docs are here:
https://github.com/jordansissel/fpm/wiki

@westurner
Copy link

"Is there is a PPA-service equivalent in the Fedora world?"
https://unix.stackexchange.com/questions/6766/is-there-is-a-ppa-service-equivalent-in-the-fedora-world

@ghost
Copy link

ghost commented Oct 21, 2017

Depedencies name for distro that is using rpm and yum package manager

CentOS 7 dependencies name

  • pexpect
  • python-appindicator
  • libXxf86vm
  • gnome-python2-gconf
  • pygtk2
  • pygtk2-libglade
  • git
  • python2-pyxdg

@ghost
Copy link

ghost commented Oct 21, 2017

sudo apt install rpm to install rpmbuild on Ubuntu.
if you want to build on CentOS 7 itself, you can run yum install rpm-build to install rpmbuild.

Hi, I built a manual prototype RPM template for CentOS 7. It was built on Ubuntu 16.04 using rpm & rpmbuild tool.
I want to try the package with CentOs 7 myself, but for some reason, installing CentOS7 and other RPM based distros both on my native system and virtual machine doesn't seems to work...

You can build it from my source template and change the Buildarch variable in rpmbuild/SPECS/fluxgui.spec to your own arch i386 or x86_64 and run rpmbuild -bb rpmbuild/SPECS/fluxgui.spec to rebuild it.

When you are done building, the rpm package can be found in rpmbuild/RPMS/.

Hope it helps!

fluxgui.spec

Summary: Bluelight filter
Name: fluxgui
Version: 1.1.11
Release: 1%{?dist}
Source0: fluxgui-1.1.11.tar.gz
Buildarch: i386
Requires: pexpect, python-appindicator, libXxf86vm, gnome-python2-gconf, pygtk2, pygtk2-libglade, python2-pyxdg
License: MIT
Url: https://github.com/xflux-gui/xflux-gui
Group: Utilities

%description
f.lux indicator applet is an indicator applet to control xflux, an
 application that makes the color of your computers display adapt to the time
of day, warm at nights and like sunlight during the day
0
%prep
%setup -q -c

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin

# dynamic python lib path (doesn't work with %dir)
#PYTHON_FLUXGUI_LIB=$(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()')

mkdir -p $RPM_BUILD_ROOT/usr/lib/python2.7/dist-packages/fluxgui

install -m 0755 fluxgui/fluxgui $RPM_BUILD_ROOT/usr/local/bin/fluxgui

cd fluxgui
python download-xflux.py
cd ..

install -m 0755 fluxgui/xflux $RPM_BUILD_ROOT/usr/local/bin/xflux

mv fluxgui/src/fluxgui $RPM_BUILD_ROOT/usr/lib/python2.7/dist-packages

%clean
rm -rf $RPM_BUILD_ROOT/usr/local/bin/fluxgui
rm -rf $RPM_BUILD_ROOT/usr/local/bin/xflux
rm -rf $RPM_BUILD_ROOT/usr/lib/python2.7/dist-packages/fluxgui

%files
%defattr(-,root,root)

/usr/local/bin/fluxgui
/usr/local/bin/xflux

%dir
/usr/lib/python2.7/dist-packages/fluxgui

PS: My internet connection for uploading is slower than average, sorry for the missing premade rpm!
rpm_source.tar.gz

Update: Finally uploaded the i386 premade rpm package!

premade_rpm.tar.gz

@westurner
Copy link

Thanks! You can build rpms for a different OS (eg CentOS 7) with Docker.

@jgarte
Copy link

jgarte commented Jun 25, 2023

#160 can solve #41 in a highly reproducible way since Guix has a way of outputting rpm packages:

https://guix.gnu.org/en/manual/devel/en/html_node/Invoking-guix-pack.html#index-RPM_002c-build-an-RPM-archive-with-guix-pack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants