# Full 40-char SHA of the upstream master commit being packaged. The # weekly .gitlab-ci.yml schedule rewrites this to upstream HEAD and # stamps a fresh Release; the push then triggers the COPR webhook. %global gitcommit 153f76d65608c184a972ad7d0b4ae605e56c0972 %global gitcommit_short %(echo %{gitcommit} | cut -c1-7) # Upstream's release LDFLAGS carry -s: the binary arrives pre-stripped, # so the automatic -debuginfo subpackage would be empty and fail. %global debug_package %{nil} Name: umtp-responder Version: 1.9.1 Release: 20260731095417%{?dist} Summary: Lightweight USB Media Transfer Protocol (MTP) responder daemon License: GPL-3.0-only URL: https://github.com/viveris/uMTP-Responder Source0: https://github.com/viveris/uMTP-Responder/archive/%{gitcommit}.tar.gz#/%{name}-%{gitcommit_short}.tar.gz Source1: umtprd.conf Source2: pocketds-mtp-gadget Source3: umtp-responder.service Source4: 95-umtp-responder.preset Source5: pocketds-mtp-sd-sync Source6: umtp-responder-sd.path Source7: umtp-responder-sd.service # Pocket DS is aarch64-only; refuse the build on x86 to avoid wasted # COPR cycles. ExclusiveArch: aarch64 BuildRequires: gcc BuildRequires: make BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros %description uMTP-Responder exposes the Pocket DS's storage to a connected PC over USB MTP, the same way an Android phone does. This package ships the upstream umtprd daemon built in FunctionFS mode plus the Pocket DS configfs gadget glue: plug the device into a computer and the user's home directory appears as a portable device — no configuration needed. %prep %autosetup -n uMTP-Responder-%{gitcommit} %build # CPPFLAGS is unused by the upstream Makefile so it can carry the # distro flags; overriding CFLAGS/LDFLAGS on the command line would # clobber the Makefile's += lines (-I./inc, SYSTEMD=1's -DSYSTEMD_NOTIFY # and -lsystemd). # # CONFIG_USB_SS_SUPPORT is off in upstream's buildconf.h, but the # QCS8550 dwc3 trains the link at SuperSpeed Plus — without SS # descriptors the host reads the device descriptor and then finds no # configuration valid for that speed ("no configurations, error -22", # endless re-enumeration). Verified on hardware against a USB4 host. make %{?_smp_mflags} SYSTEMD=1 CPPFLAGS="%{optflags} -DCONFIG_USB_SS_SUPPORT=1" %install install -Dpm0755 umtprd %{buildroot}%{_bindir}/umtprd install -Dpm0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/umtprd/umtprd.conf install -Dpm0755 %{SOURCE2} %{buildroot}%{_libexecdir}/pocketds-mtp-gadget install -Dpm0644 %{SOURCE3} %{buildroot}%{_unitdir}/umtp-responder.service install -Dpm0644 %{SOURCE4} %{buildroot}%{_presetdir}/95-umtp-responder.preset install -Dpm0755 %{SOURCE5} %{buildroot}%{_libexecdir}/pocketds-mtp-sd-sync install -Dpm0644 %{SOURCE6} %{buildroot}%{_unitdir}/umtp-responder-sd.path install -Dpm0644 %{SOURCE7} %{buildroot}%{_unitdir}/umtp-responder-sd.service %post %systemd_post umtp-responder.service umtp-responder-sd.path %preun %systemd_preun umtp-responder.service umtp-responder-sd.path %postun %systemd_postun_with_restart umtp-responder.service %files %license LICENSE %doc README.md Release-notes.txt %{_bindir}/umtprd %dir %{_sysconfdir}/umtprd %config(noreplace) %{_sysconfdir}/umtprd/umtprd.conf %{_libexecdir}/pocketds-mtp-gadget %{_libexecdir}/pocketds-mtp-sd-sync %{_unitdir}/umtp-responder.service %{_unitdir}/umtp-responder-sd.path %{_unitdir}/umtp-responder-sd.service %{_presetdir}/95-umtp-responder.preset %changelog * Fri Jul 31 2026 Pocket DS Maintainers - %{version}-%{release} - Release auto-stamped from build timestamp; full history in git log