Merge pull request #18634 from ayhanyalcinsoy/master
pisi-software-center:build files are modified
This commit is contained in:
@@ -8,21 +8,16 @@ from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
import os
|
||||
|
||||
|
||||
def setup():
|
||||
pisitools.dosed("Makefile", "package-manager.png", "pisi-software-center.png")
|
||||
shelltools.export("CARGO_HOME", os.path.join(get.workDIR(), ".cargo"))
|
||||
|
||||
def build():
|
||||
shelltools.system("cargo build --release ")
|
||||
shelltools.system("make")
|
||||
|
||||
|
||||
def install():
|
||||
shelltools.system("cargo install --path . --root='%s'/usr" % get.installDIR())
|
||||
pisitools.insinto("/usr/share/applications/", "assets/pisi-software-center.desktop")
|
||||
pisitools.insinto("/usr/share/applications/pisi/", "assets/pisi-installer.desktop")
|
||||
pisitools.insinto("/usr/share/mime/packages/", "assets/pisi-mime.xml")
|
||||
pisitools.insinto("/usr/share/icons/", "assets/pisi-software-center.png")
|
||||
pisitools.remove("/usr/.crates.toml")
|
||||
pisitools.remove("/usr/.crates2.json")
|
||||
shelltools.system("make DESTDIR=%s install" % get.installDIR())
|
||||
pisitools.dodoc("LICENSE", "README.md","TODO.md*")
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
# MIME veritabanını güncelle (.pisi uzantısını tanısın)
|
||||
os.system("update-mime-database /usr/share/mime")
|
||||
|
||||
# Desktop veritabanını güncelle (Hangi dosyanın hangi uygulama ile açılacağını kaydet)
|
||||
os.system("update-desktop-database /usr/share/applications")
|
||||
|
||||
# (Opsiyonel) .pisi dosyaları için varsayılan uygulamayı ayarla
|
||||
os.system("xdg-mime default pisi-installer.desktop application/pisi-software-center.xml")
|
||||
@@ -0,0 +1,39 @@
|
||||
--- Makefile_old 2026-05-07 00:40:03.031214600 +0300
|
||||
+++ Makefile 2026-05-07 00:40:56.917374600 +0300
|
||||
@@ -2,7 +2,7 @@
|
||||
BINDIR = $(PREFIX)/bin
|
||||
DATADIR = $(PREFIX)/share
|
||||
APPDIR = $(DATADIR)/applications
|
||||
-ICONDIR = $(DATADIR)/pixmaps
|
||||
+ICONDIR = $(DATADIR)/icons/hicolor
|
||||
MIMEDIR = $(DATADIR)/mime/packages
|
||||
|
||||
all: build
|
||||
@@ -21,9 +21,11 @@
|
||||
install -Dm644 assets/pisi-software-center.png $(DESTDIR)$(ICONDIR)/pisi-software-center.png
|
||||
# Mime tipini kopyala
|
||||
install -Dm644 assets/pisi-mime.xml $(DESTDIR)$(MIMEDIR)/pisi-software-center.xml
|
||||
- # Veritabanlarını güncelle (Hata olsa da devam et)
|
||||
- -update-desktop-database -q $(DESTDIR)$(APPDIR)
|
||||
- -update-mime-database $(DESTDIR)$(DATADIR)/mime
|
||||
+ # Veritabanlarını sadece doğrudan sisteme kuruluyorsa güncelle
|
||||
+ifeq ($(DESTDIR),)
|
||||
+ -update-desktop-database -q $(APPDIR)
|
||||
+ -update-mime-database $(DATADIR)/mime
|
||||
+endif
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(BINDIR)/pisi-software-center
|
||||
@@ -32,8 +34,10 @@
|
||||
rm -f $(DESTDIR)$(APPDIR)/pisi-installer.desktop
|
||||
rm -f $(DESTDIR)$(ICONDIR)/pisi-software-center.png
|
||||
rm -f $(DESTDIR)$(MIMEDIR)/pisi-software-center.xml
|
||||
- -update-desktop-database -q $(DESTDIR)$(APPDIR)
|
||||
- -update-mime-database $(DESTDIR)$(DATADIR)/mime
|
||||
+ifeq ($(DESTDIR),)
|
||||
+ -update-desktop-database -q $(APPDIR)
|
||||
+ -update-mime-database $(DATADIR)/mime
|
||||
+endif
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
@@ -21,13 +21,15 @@
|
||||
<Dependency versionFrom="1.93.0">gtk3-devel</Dependency>
|
||||
<Dependency>openssl-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>Makefile.patch</Patch>
|
||||
</Patches>
|
||||
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>pisi-software-center</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>rust</Dependency>
|
||||
<Dependency>pisi</Dependency>
|
||||
<Dependency>openssl</Dependency>
|
||||
</RuntimeDependencies>
|
||||
@@ -40,13 +42,14 @@
|
||||
<Path fileType="data">/usr/share/mime/packages/</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="postInstall.py">System.Package</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2026-05-06</Date>
|
||||
<Date>2026-05-07</Date>
|
||||
<Version>0.1.3</Version>
|
||||
<Comment>New Package</Comment>
|
||||
<Name>Ali Cengiz Kurt</Name>
|
||||
|
||||
Reference in New Issue
Block a user