Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
MeanEYE committed Jan 30, 2016
2 parents c2259c5 + 3fe3908 commit 252f1a8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
28 changes: 7 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@ define DEBIAN_INSTALL
install -Dm644 "$(BUILD_DIRECTORY)/Sunflower/Sunflower.desktop" "$(DEBIAN_BUILD_DIRECTORY)/usr/share/applications/sunflower.desktop"
endef

# install program to fake root (this needs to be the same as dist/PKGBUILD)
define FEDORA_INSTALL
mkdir -p $(FEDORA_BUILD_DIRECTORY)
tar -xf $(FILE_PATH).tar -C $(BUILD_DIRECTORY)
install -Dm755 $(WORKING_DIRECTORY)/dist/sunflower "$(FEDORA_BUILD_DIRECTORY)/usr/bin/sunflower"
install -d "$(FEDORA_BUILD_DIRECTORY)/usr/share/sunflower"
cp -r $(BUILD_DIRECTORY)/Sunflower/* "$(FEDORA_BUILD_DIRECTORY)/usr/share/sunflower"
install -Dm644 "$(BUILD_DIRECTORY)/Sunflower/images/sunflower.png" "$(FEDORA_BUILD_DIRECTORY)/usr/share/pixmaps/sunflower.png"
install -Dm644 "$(BUILD_DIRECTORY)/Sunflower/images/sunflower.svg" "$(FEDORA_BUILD_DIRECTORY)/usr/share/pixmaps/sunflower.svg"
install -Dm644 "$(BUILD_DIRECTORY)/Sunflower/Sunflower.desktop" "$(FEDORA_BUILD_DIRECTORY)/usr/share/applications/sunflower.desktop"
endef

# replace variables in spec file
define CREATE_RPM_SPEC_FILE
cp $(WORKING_DIRECTORY)/dist/sunflower.spec $(BUILD_DIRECTORY)
Expand Down Expand Up @@ -122,34 +110,32 @@ dist-arch: dist
cd $(ARCH_BUILD_DIRECTORY); makepkg -g >> PKGBUILD
cd $(ARCH_BUILD_DIRECTORY); makepkg
mv $(ARCH_BUILD_DIRECTORY)/sunflower-$(VERSION)-$(RELEASE)-any.pkg.tar.xz $(PKG_FILE_PATH)
sha256sum $(PKG_FILE_PATH) > $(PKG_FILE_PATH).sha256

dist-rpm: archive
$(info Building package for Fedora, Mageia, Mandriva...)
$(FEDORA_INSTALL)
$(CREATE_RPM_SPEC_FILE)
sed -i s/@requires@/pygtk2/ $(BUILD_DIRECTORY)/sunflower.spec
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --buildroot "$(FEDORA_BUILD_DIRECTORY)"
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --build-in-place --buildroot "$(abspath $(FEDORA_BUILD_DIRECTORY))"
cp ~/rpmbuild/RPMS/noarch/sunflower-$(VERSION)-$(RELEASE).noarch.rpm $(RPM_FILE_PATH)
rm -rf $(FEDORA_BUILD_DIRECTORY) $(BUILD_DIRECTORY)/sunflower.spec $(BUILD_DIRECTORY)/Sunflower
sha256sum $(RPM_FILE_PATH) > $(RPM_FILE_PATH).sha256

dist-rpm-opensuse: archive
$(info Building package for OpenSUSE...)
$(FEDORA_INSTALL)
$(CREATE_RPM_SPEC_FILE)
sed -i s/@requires@/python-gtk/ $(BUILD_DIRECTORY)/sunflower.spec
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --buildroot "$(FEDORA_BUILD_DIRECTORY)"
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --build-in-place --buildroot "$(abspath $(FEDORA_BUILD_DIRECTORY))"
cp ~/rpmbuild/RPMS/noarch/sunflower-$(VERSION)-$(RELEASE).noarch.rpm $(RPM_OPENSUSE_FILE_PATH)
rm -rf $(FEDORA_BUILD_DIRECTORY) $(BUILD_DIRECTORY)/sunflower.spec $(BUILD_DIRECTORY)/Sunflower
sha256sum $(RPM_OPENSUSE_FILE_PATH) > $(RPM_OPENSUSE_FILE_PATH).sha256

dist-rpm-pclinuxos: archive
$(info Building package for PCLinuxOS...)
$(FEDORA_INSTALL)
$(CREATE_RPM_SPEC_FILE)
sed -i s/@requires@/pygtk2.0/ $(BUILD_DIRECTORY)/sunflower.spec
desktop-file-edit --add-category="X-MandrivaLinux-System-FileTools" "$(FEDORA_BUILD_DIRECTORY)/usr/share/applications/sunflower.desktop"
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --buildroot "$(FEDORA_BUILD_DIRECTORY)"
rpmbuild -bb $(BUILD_DIRECTORY)/sunflower.spec --build-in-place --buildroot "$(abspath $(FEDORA_BUILD_DIRECTORY))"
cp ~/rpmbuild/RPMS/noarch/sunflower-$(VERSION)-$(RELEASE).noarch.rpm $(RPM_PCLINUXOS_FILE_PATH)
rm -rf $(FEDORA_BUILD_DIRECTORY) $(BUILD_DIRECTORY)/sunflower.spec $(BUILD_DIRECTORY)/Sunflower
sha256sum $(RPM_PCLINUXOS_FILE_PATH) > $(RPM_PCLINUXOS_FILE_PATH).sha256

dist-all: dist-deb dist-rpm dist-rpm-opensuse dist-rpm-pclinuxos dist-pkg

Expand Down
2 changes: 1 addition & 1 deletion application/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MainWindow(gtk.Window):
version = {
'major': 0,
'minor': 3,
'build': 60,
'build': 61,
'stage': 'f'
}

Expand Down
12 changes: 10 additions & 2 deletions dist/sunflower.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@ Requires: @requires@
%description
Small and highly customizable twin-panel file manager for Linux with support for plugins.


%install
mkdir -p "$RPM_BUILD_ROOT/usr/bin"
mkdir -p "$RPM_BUILD_ROOT/usr/share/applications"
tar -xf build/sunflower-*.tar -C build/
install -Dm755 "dist/sunflower" "$RPM_BUILD_ROOT/usr/bin/sunflower"
install -d "$RPM_BUILD_ROOT/usr/share/sunflower"
cp -r build/Sunflower/* "$RPM_BUILD_ROOT/usr/share/sunflower"
install -Dm644 "build/Sunflower/images/sunflower.png" "$RPM_BUILD_ROOT/usr/share/pixmaps/sunflower.png"
install -Dm644 "build/Sunflower/images/sunflower.svg" "$RPM_BUILD_ROOT/usr/share/pixmaps/sunflower.svg"
install -Dm644 "build/Sunflower/Sunflower.desktop" "$RPM_BUILD_ROOT/usr/share/applications/sunflower.desktop"

%files
%defattr(0644,root,root,0755)
/usr/share/sunflower/*
%attr(0755,root,root) /usr/bin/sunflower
%attr(0755,root,root) /usr/share/sunflower/Sunflower.py
%attr(0644,root,root) /usr/share/pixmaps/sunflower.png
%attr(0644,root,root) /usr/share/pixmaps/sunflower.svg
%attr(0644,root,root) /usr/share/applications/sunflower.desktop
%doc README.md TODO CHANGES COPYING LICENSE AUTHORS DEPENDS

0 comments on commit 252f1a8

Please sign in to comment.