]> git.pld-linux.org Git - packages/cura.git/commitdiff
- initial from FC
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 14 May 2015 20:49:04 +0000 (22:49 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 14 May 2015 20:49:04 +0000 (22:49 +0200)
cura [new file with mode: 0755]
cura-dont-show-nc-stls.patch [new file with mode: 0644]
cura-newlines.patch [new file with mode: 0644]
cura-no-firmware.patch [new file with mode: 0644]
cura-system-paths.patch [new file with mode: 0644]
cura-version.patch [new file with mode: 0644]
cura.desktop [new file with mode: 0644]
cura.spec [new file with mode: 0644]

diff --git a/cura b/cura
new file mode 100755 (executable)
index 0000000..322824e
--- /dev/null
+++ b/cura
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+import os
+import sys
+import Cura.cura as cura
+
+# Make all paths absolute, we are gonna change the pwd
+for i in range(len(sys.argv)):
+    if os.path.exists(sys.argv[i]):
+        sys.argv[i] = os.path.abspath(sys.argv[i])
+
+# change the pwd
+os.chdir("/usr/lib/python2.7/site-packages/")
+
+# start cura
+cura.main()
diff --git a/cura-dont-show-nc-stls.patch b/cura-dont-show-nc-stls.patch
new file mode 100644 (file)
index 0000000..d814f1d
--- /dev/null
@@ -0,0 +1,119 @@
+diff -urN Cura-15.02.1.org/Cura/gui/sceneView.py Cura-15.02.1/Cura/gui/sceneView.py
+--- Cura-15.02.1.org/Cura/gui/sceneView.py     2015-02-18 21:22:48.000000000 +0100
++++ Cura-15.02.1/Cura/gui/sceneView.py 2015-05-14 22:34:56.020409418 +0200
+@@ -1320,105 +1320,16 @@
+               size = [profile.getMachineSettingFloat('machine_width'), profile.getMachineSettingFloat('machine_depth'), profile.getMachineSettingFloat('machine_height')]
+-              machine_type = profile.getMachineSetting('machine_type')
+-              if machine_type not in self._platformMesh:
+-                      self._platformMesh[machine_type] = None
+-
+-                      filename = None
+-                      texture_name = None
+-                      offset = [0,0,0]
+-                      texture_offset = [0,0,0]
+-                      texture_scale = 1.0
+-                      if machine_type == 'ultimaker2' or machine_type == 'ultimaker2extended':
+-                              filename = resources.getPathForMesh('ultimaker2_platform.stl')
+-                              offset = [-9,-37,145]
+-                              texture_name = 'Ultimaker2backplate.png'
+-                              texture_offset = [9,150,-5]
+-                      elif machine_type == 'ultimaker2go':
+-                              filename = resources.getPathForMesh('ultimaker2go_platform.stl')
+-                              offset = [0,-42,145]
+-                              texture_offset = [0,105,-5]
+-                              texture_name = 'Ultimaker2backplate.png'
+-                              texture_scale = 0.9
+-                      elif machine_type == 'ultimaker_plus':
+-                              filename = resources.getPathForMesh('ultimaker2_platform.stl')
+-                              offset = [0,-37,145]
+-                              texture_offset = [0,150,-5]
+-                              texture_name = 'UltimakerPlusbackplate.png'
+-                      elif machine_type == 'ultimaker':
+-                              filename = resources.getPathForMesh('ultimaker_platform.stl')
+-                              offset = [0,0,2.5]
+-                      elif machine_type == 'Witbox':
+-                              filename = resources.getPathForMesh('Witbox_platform.stl')
+-                              offset = [0,-37,145]
+-
+-                      if filename is not None:
+-                              meshes = meshLoader.loadMeshes(filename)
+-                              if len(meshes) > 0:
+-                                      self._platformMesh[machine_type] = meshes[0]
+-                                      self._platformMesh[machine_type]._drawOffset = numpy.array(offset, numpy.float32)
+-                                      self._platformMesh[machine_type].texture = None
+-                                      if texture_name is not None:
+-                                              self._platformMesh[machine_type].texture = openglHelpers.loadGLTexture(texture_name)
+-                                              self._platformMesh[machine_type].texture_offset = texture_offset
+-                                              self._platformMesh[machine_type].texture_scale = texture_scale
+-              if self._platformMesh[machine_type] is not None:
+-                      mesh = self._platformMesh[machine_type]
+-                      glColor4f(1,1,1,0.5)
+-                      self._objectShader.bind()
+-                      self._renderObject(mesh, False, False)
+-                      self._objectShader.unbind()
+-
+-                      #For the Ultimaker 2 render the texture on the back plate to show the Ultimaker2 text.
+-                      if mesh.texture is not None:
+-                              glBindTexture(GL_TEXTURE_2D, mesh.texture)
+-                              glEnable(GL_TEXTURE_2D)
+-                              glPushMatrix()
+-                              glColor4f(1,1,1,1)
+-
+-                              glTranslate(mesh.texture_offset[0], mesh.texture_offset[1], mesh.texture_offset[2])
+-                              glScalef(mesh.texture_scale, mesh.texture_scale, mesh.texture_scale)
+-                              h = 50
+-                              d = 8
+-                              w = 100
+-                              glEnable(GL_BLEND)
+-                              glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA)
+-                              glEnable(GL_ALPHA_TEST)
+-                              glAlphaFunc(GL_GREATER, 0.0)
+-                              glBegin(GL_QUADS)
+-                              glTexCoord2f(1, 0)
+-                              glVertex3f( w, 0, h)
+-                              glTexCoord2f(0, 0)
+-                              glVertex3f(-w, 0, h)
+-                              glTexCoord2f(0, 1)
+-                              glVertex3f(-w, 0, 0)
+-                              glTexCoord2f(1, 1)
+-                              glVertex3f( w, 0, 0)
+-
+-                              glTexCoord2f(1, 0)
+-                              glVertex3f(-w, d, h)
+-                              glTexCoord2f(0, 0)
+-                              glVertex3f( w, d, h)
+-                              glTexCoord2f(0, 1)
+-                              glVertex3f( w, d, 0)
+-                              glTexCoord2f(1, 1)
+-                              glVertex3f(-w, d, 0)
+-                              glEnd()
+-                              glDisable(GL_TEXTURE_2D)
+-                              glDisable(GL_ALPHA_TEST)
+-                              glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+-                              glPopMatrix()
+-              else:
+-                      glColor4f(0,0,0,1)
+-                      glLineWidth(3)
+-                      glBegin(GL_LINES)
+-                      glVertex3f(-size[0] / 2, -size[1] / 2, 0)
+-                      glVertex3f(-size[0] / 2, -size[1] / 2, 10)
+-                      glVertex3f(-size[0] / 2, -size[1] / 2, 0)
+-                      glVertex3f(-size[0] / 2+10, -size[1] / 2, 0)
+-                      glVertex3f(-size[0] / 2, -size[1] / 2, 0)
+-                      glVertex3f(-size[0] / 2, -size[1] / 2+10, 0)
+-                      glEnd()
++              glColor4f(0,0,0,1)
++              glLineWidth(3)
++              glBegin(GL_LINES)
++              glVertex3f(-size[0] / 2, -size[1] / 2, 0)
++              glVertex3f(-size[0] / 2, -size[1] / 2, 10)
++              glVertex3f(-size[0] / 2, -size[1] / 2, 0)
++              glVertex3f(-size[0] / 2+10, -size[1] / 2, 0)
++              glVertex3f(-size[0] / 2, -size[1] / 2, 0)
++              glVertex3f(-size[0] / 2, -size[1] / 2+10, 0)
++              glEnd()
+               glDepthMask(False)
diff --git a/cura-newlines.patch b/cura-newlines.patch
new file mode 100644 (file)
index 0000000..1b50441
--- /dev/null
@@ -0,0 +1,38 @@
+--- Cura-15.02.1/resources/locale/zh/LC_MESSAGES/Cura.po~      2015-05-14 22:40:18.934776079 +0200
++++ Cura-15.02.1/resources/locale/zh/LC_MESSAGES/Cura.po       2015-05-14 22:40:49.762177833 +0200
+@@ -1679,7 +1679,7 @@
+ "支撑结构类型。\n"\r
+ "通常使用\"Touching buildplate\"建立支撑 \n"\r
+ "\n"\r
+-"选择 None 不会建立支撑\n"\r
++"选择 None 不会建立支撑"\r
\r
+ #: Cura/util/profile.py:192 Cura/util/profile.py:243\r
+ msgid "Brim"\r
+@@ -1712,7 +1712,7 @@
+ "(Note that enabling the brim or raft disables the skirt)"\r
+ msgstr ""\r
+ "Brim会在模型底边周围增加数圈薄层,推荐使用这个选项\n"\r
+-"Raft会打印模型前打印一个网状底座\n"\r
++"Raft会打印模型前打印一个网状底座"\r
\r
+ #: Cura/util/profile.py:193\r
+ msgid "Both"\r
+@@ -2565,7 +2565,7 @@
+ "个\n"\r
+ "选项会打开会则会不理会这些洞.这个选项一般是你所不需要的,除非在出现切片失败"\r
+ "的\n"\r
+-"情况下,你可能需要打开它.\n"\r
++"情况下,你可能需要打开它."\r
\r
+ #: Cura/util/profile.py:258\r
+ msgid "Extensive stitching"\r
+@@ -2762,7 +2762,7 @@
+ msgstr ""\r
+ "GCode生成的风格\n"\r
+ "RepRap一般是5D GCode,兼容于Marlin/Sprinter固件\n"\r
+-"UltiGCode是一种GCode派生,把部分配置放到里机器里,而不是切片软件\n"\r
++"UltiGCode是一种GCode派生,把部分配置放到里机器里,而不是切片软件"\r
\r
+ #: Cura/util/profile.py:533\r
+ msgid "Extruder count"\r
diff --git a/cura-no-firmware.patch b/cura-no-firmware.patch
new file mode 100644 (file)
index 0000000..39a3873
--- /dev/null
@@ -0,0 +1,81 @@
+diff -urN Cura-15.02.1.org/Cura/gui/firmwareInstall.py Cura-15.02.1/Cura/gui/firmwareInstall.py
+--- Cura-15.02.1.org/Cura/gui/firmwareInstall.py       2015-02-18 21:22:48.000000000 +0100
++++ Cura-15.02.1/Cura/gui/firmwareInstall.py   2015-05-14 22:37:20.963865640 +0200
+@@ -17,47 +17,6 @@
+ from Cura.util import resources
+ def getDefaultFirmware(machineIndex = None):
+-      machine_type = profile.getMachineSetting('machine_type', machineIndex)
+-      extruders = profile.getMachineSettingFloat('extruder_amount', machineIndex)
+-      heated_bed = profile.getMachineSetting('has_heated_bed', machineIndex) == 'True'
+-      baudrate = 250000
+-      if sys.platform.startswith('linux'):
+-              baudrate = 115200
+-      if machine_type == 'ultimaker':
+-              name = 'MarlinUltimaker'
+-              if extruders > 2:
+-                      return None
+-              if heated_bed:
+-                      name += '-HBK'
+-              name += '-%d' % (baudrate)
+-              if extruders > 1:
+-                      name += '-dual'
+-              return resources.getPathForFirmware(name + '.hex')
+-
+-      if machine_type == 'ultimaker_plus':
+-              name = 'MarlinUltimaker-UMOP-%d' % (baudrate)
+-              if extruders > 2:
+-                      return None
+-              if extruders > 1:
+-                      name += '-dual'
+-              return resources.getPathForFirmware(name + '.hex')
+-
+-      if machine_type == 'ultimaker2':
+-              if extruders > 2:
+-                      return None
+-              if extruders > 1:
+-                      return resources.getPathForFirmware("MarlinUltimaker2-dual.hex")
+-              return resources.getPathForFirmware("MarlinUltimaker2.hex")
+-      if machine_type == 'ultimaker2go':
+-              return resources.getPathForFirmware("MarlinUltimaker2go.hex")
+-      if machine_type == 'ultimaker2extended':
+-              if extruders > 2:
+-                      return None
+-              if extruders > 1:
+-                      return resources.getPathForFirmware("MarlinUltimaker2extended-dual.hex")
+-              return resources.getPathForFirmware("MarlinUltimaker2extended.hex")
+-      if machine_type == 'Witbox':
+-              return resources.getPathForFirmware("MarlinWitbox.hex")
+       return None
+ class InstallFirmware(wx.Dialog):
+@@ -68,7 +27,7 @@
+               if filename is None:
+                       filename = getDefaultFirmware(machineIndex)
+               if filename is None:
+-                      wx.MessageBox(_("I am sorry, but Cura does not ship with a default firmware for your machine configuration."), _("Firmware update"), wx.OK | wx.ICON_ERROR)
++            wx.MessageBox(_("I am sorry, but Cura on Fedora does not ship firmware for technical reasons. Please go download it and install it as custom firmware instead."), _("Firmware update"), wx.OK | wx.ICON_ERROR)
+                       self.Destroy()
+                       return
+               self._machine_type = profile.getMachineSetting('machine_type', machineIndex)
+diff -urN Cura-15.02.1.org/Cura/gui/mainWindow.py Cura-15.02.1/Cura/gui/mainWindow.py
+--- Cura-15.02.1.org/Cura/gui/mainWindow.py    2015-02-18 21:22:48.000000000 +0100
++++ Cura-15.02.1/Cura/gui/mainWindow.py        2015-05-14 22:37:36.827577248 +0200
+@@ -375,7 +375,6 @@
+                       self.splitter.SetSashPosition(self.normalSashPos, True)
+                       # Enabled sash
+                       self.splitter.SetSashSize(4)
+-              self.defaultFirmwareInstallMenuItem.Enable(firmwareInstall.getDefaultFirmware() is not None)
+               if profile.getMachineSetting('machine_type').startswith('ultimaker2'):
+                       self.bedLevelWizardMenuItem.Enable(False)
+                       self.headOffsetWizardMenuItem.Enable(False)
+@@ -483,9 +482,6 @@
+               #Add tools for machines.
+               self.machineMenu.AppendSeparator()
+-              self.defaultFirmwareInstallMenuItem = self.machineMenu.Append(-1, _("Install default firmware..."))
+-              self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, self.defaultFirmwareInstallMenuItem)
+-
+               i = self.machineMenu.Append(-1, _("Install custom firmware..."))
+               self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i)
diff --git a/cura-system-paths.patch b/cura-system-paths.patch
new file mode 100644 (file)
index 0000000..d90f40b
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/Cura/util/pluginInfo.py b/Cura/util/pluginInfo.py
+index 7290c8b..52fa14b 100644
+--- a/Cura/util/pluginInfo.py
++++ b/Cura/util/pluginInfo.py
+@@ -80,14 +80,7 @@ def setPostProcessPluginConfig(config):
+       profile.putProfileSetting('plugin_config', pickle.dumps(config))
+ def getPluginBasePaths():
+-      ret = []
+-      if platform.system() != "Windows":
+-              ret.append(os.path.expanduser('~/.cura/plugins/'))
+-      if platform.system() == "Darwin" and hasattr(sys, 'frozen'):
+-              ret.append(os.path.normpath(os.path.join(resources.resourceBasePath, "plugins")))
+-      else:
+-              ret.append(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'plugins')))
+-      return ret
++      return [os.path.expanduser('~/.cura/plugins/'), '/usr/share/cura/plugins']
+ def getPluginList(pluginType):
+       global _pluginList
+diff --git a/Cura/util/resources.py b/Cura/util/resources.py
+index e63230b..99bb5ce 100644
+--- a/Cura/util/resources.py
++++ b/Cura/util/resources.py
+@@ -28,7 +28,7 @@ if sys.platform.startswith('darwin'):
+       else:
+               resourceBasePath = os.path.join(os.path.dirname(__file__), "../../resources")
+ else:
+-      resourceBasePath = os.path.join(os.path.dirname(__file__), "../../resources")
++      resourceBasePath = "/usr/share/cura"
+ def getPathForResource(dir, subdir, resource_name):
+       assert os.path.isdir(dir), "{p} is not a directory".format(p=dir)
diff --git a/cura-version.patch b/cura-version.patch
new file mode 100644 (file)
index 0000000..8749999
--- /dev/null
@@ -0,0 +1,77 @@
+diff --git a/Cura/util/version.py b/Cura/util/version.py
+index 56faeee..add5eb0 100644
+--- a/Cura/util/version.py
++++ b/Cura/util/version.py
+@@ -17,70 +17,12 @@ except:
+ from Cura.util import resources
+ def getVersion(getGitVersion = True):
+-      gitPath = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../.."))
+-      if hasattr(sys, 'frozen'):
+-              versionFile = os.path.normpath(os.path.join(resources.resourceBasePath, "version"))
+-      else:
+-              versionFile = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../version"))
+-
+-      if getGitVersion:
+-              try:
+-                      gitProcess = subprocess.Popen(args = "git show -s --pretty=format:%H", shell = True, cwd = gitPath, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
+-                      (stdoutdata, stderrdata) = gitProcess.communicate()
+-
+-                      if gitProcess.returncode == 0:
+-                              return stdoutdata
+-              except:
+-                      pass
+-
+-      gitHeadFile = gitPath + "/.git/refs/heads/SteamEngine"
+-      if os.path.isfile(gitHeadFile):
+-              if not getGitVersion:
+-                      return "dev"
+-              f = open(gitHeadFile, "r")
+-              version = f.readline()
+-              f.close()
+-              return version.strip()
+-      if os.path.exists(versionFile):
+-              f = open(versionFile, "r")
+-              version = f.readline()
+-              f.close()
+-              return version.strip()
+-      versionFile = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../version"))
+-      if os.path.exists(versionFile):
+-              f = open(versionFile, "r")
+-              version = f.readline()
+-              f.close()
+-              return version.strip()
+-      return "UNKNOWN" #No idea what the version is. TODO:Tell the user.
++      return "REPLACE_THIS_IN_SPEC"
+ def isDevVersion():
+-      gitPath = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../.git"))
+-      hgPath  = os.path.abspath(os.path.join(os.path.split(os.path.abspath(__file__))[0], "../../.hg"))
+-      return os.path.exists(gitPath) or os.path.exists(hgPath)
++      return False
+ def checkForNewerVersion():
+-      if isDevVersion():
+-              return None
+-      try:
+-              updateBaseURL = 'http://software.ultimaker.com'
+-              localVersion = map(int, getVersion(False).split('.'))
+-              while len(localVersion) < 3:
+-                      localVersion += [1]
+-              latestFile = urllib2.urlopen("%s/latest.xml" % (updateBaseURL))
+-              latestXml = latestFile.read()
+-              latestFile.close()
+-              xmlTree = ElementTree.fromstring(latestXml)
+-              for release in xmlTree.iter('release'):
+-                      os = str(release.attrib['os'])
+-                      version = [int(release.attrib['major']), int(release.attrib['minor']), int(release.attrib['revision'])]
+-                      filename = release.find("filename").text
+-                      if platform.system() == os:
+-                              if version > localVersion:
+-                                      return "%s/current/%s" % (updateBaseURL, filename)
+-      except:
+-              #print sys.exc_info()
+-              return None
+       return None
+ if __name__ == '__main__':
diff --git a/cura.desktop b/cura.desktop
new file mode 100644 (file)
index 0000000..9debbd2
--- /dev/null
@@ -0,0 +1,9 @@
+
+[Desktop Entry]
+Name=Cura
+GenericName=3D Printer Interface
+Exec=cura
+Icon=/usr/share/pixmaps/cura.ico
+Terminal=false
+Type=Application
+Categories=Graphics;
diff --git a/cura.spec b/cura.spec
new file mode 100644 (file)
index 0000000..2b6cb25
--- /dev/null
+++ b/cura.spec
@@ -0,0 +1,111 @@
+Summary:       3D printer control software
+Name:          cura
+Version:       15.02.1
+Release:       0.1
+Group:         Applications/Engineering
+# Code is AGPLv3
+# Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683
+# Example models are CC-BY-SA
+# TweakAtZ.py is CC-BY-SA
+License:       AGPLv3 and CC-BY-SA
+URL:           http://daid.github.com/Cura/
+Source0:       https://github.com/daid/Cura/archive/%{version}.tar.gz
+# Source0-md5: f41ba365e5b98907cf55fc70e056c2e8
+Source1:       %{name}
+Source2:       %{name}.desktop
+# UltimakerPlatforms STLs were stripped from the tarball, don't crash because of that
+Patch0:                %{name}-dont-show-nc-stls.patch
+# Use system paths
+Patch1:                %{name}-system-paths.patch
+# Rework the logic of determining the version (didn't work)
+Patch2:                %{name}-version.patch
+Patch3:                %{name}-no-firmware.patch
+Patch4:                %{name}-newlines.patch
+BuildRequires: desktop-file-utils
+BuildRequires: dos2unix
+BuildRequires: gettext
+BuildRequires: python-devel
+Requires:      CuraEngine >= 14.12.1
+Requires:      pypy
+Requires:      python-PyOpenGL
+Requires:      python-numpy
+Requires:      python-power
+Requires:      python-serial
+Requires:      wxPython
+BuildArch:     noarch
+
+%description
+Cura is a project which aims to be an single software solution for 3D
+printing. While it is developed to be used with the Ultimaker 3D
+printer, it can be used with other RepRap based designs.
+
+Cura helps you to setup an Ultimaker, shows your 3D model, allows for
+scaling / positioning, can slice the model to G-Code, with sane
+editable configuration settings and send this G-Code to the 3D printer
+for printing.
+
+%prep
+%setup -qn Cura-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+# Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl
+FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ')
+sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
+
+dos2unix resources/example/Attribution.txt
+
+sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
+
+mv resources/locale/{zh,zh_CN}
+rm -rf resources/locale/po
+
+%build
+# rebuild locales
+cd resources/locale
+rm *.in *.pot
+for FILE in *
+  do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
+  rm $FILE/LC_MESSAGES/Cura.po
+done
+cd -
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/firmware
+install -d $RPM_BUILD_ROOT%{_pixmapsdir}
+install -d $RPM_BUILD_ROOT%{_localedir}
+install -d $RPM_BUILD_ROOT%{_bindir}
+
+cp -apr Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
+rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE
+cp -apr resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -apr plugins $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -ap %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
+ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources
+ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir}
+
+# locales
+cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir}
+rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale
+ln -s -f %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here
+
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
+
+%{find_lang} Cura
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f Cura.lang
+%defattr(644,root,root,755)
+%doc Cura/LICENSE resources/example/Attribution.txt
+%{py_sitescriptdir}/Cura
+%{_datadir}/%{name}
+%{_pixmapsdir}/%{name}.ico
+%{_desktopdir}/%{name}.desktop
+%attr(755,root,root) %{_bindir}/%{name}
This page took 0.115768 seconds and 4 git commands to generate.